/*
Theme Name: Woodcraft Premium
Theme URI: https://woodcraft.com
Description: A premium, luxurious WordPress theme for Woodcraft Kitchens and Furniture.
Version: 1.1.0
Author: Mostafa Mahmoud
Author URI: https://mostafamahmoud.com
Tags: custom-background, custom-colors, custom-menu, featured-images, full-width-template, theme-options, translation-ready, luxurious, premium
Text Domain: woodcraft-theme
*/

/*
Global Design System
--------------------------------------------------------------
Primary Background: #ffffff
Dark Background / Text: #111111 or #1a1a1a
Accent / Hover Color: #ed0000
Heading Font: Outfit, Raleway, or Montserrat
Body Font: Inter or DM Sans
--------------------------------------------------------------
*/

:root {
    --primary-bg: #ffffff;
    --dark-bg: #0f0f0f;
    --dark-text: #1a1a1a;
    --accent: #ed0000;
    --accent-hover: #c00000;
    --heading-font: 'Outfit', sans-serif;
    --body-font: 'Inter', sans-serif;
    --transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --container-width: 1600px;
    --section-padding: 120px 0;
    --card-radius: 16px;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow-soft: 0 10px 30px rgba(0,0,0,0.03);
    --shadow-medium: 0 20px 40px rgba(0,0,0,0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--body-font);
    background-color: var(--primary-bg);
    color: var(--dark-text);
    line-height: 1.8;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    font-weight: 700;
    color: var(--dark-bg);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(48px, 6vw, 76px); }
h2 { font-size: clamp(32px, 4vw, 48px); margin-bottom: 24px; }
h3 { font-size: clamp(22px, 3vw, 28px); }

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 30px;
}

.section {
    padding: var(--section-padding);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 36px;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 15px;
    text-transform: uppercase;
}

.btn-primary {
    background-color: var(--dark-bg);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn-primary:hover {
    background-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(237, 0, 0, 0.3);
}

.btn-ghost {
    background-color: transparent;
    border: 2px solid rgba(0, 0, 0, 0.1);
    color: var(--dark-bg);
}

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-3px);
}

/* Header & Navigation */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 30px 0;
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    /* Subtle gradient to ensure white logo is visible on top of bright media */
    background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, transparent 100%);
}

.site-header.scrolled {
    background: rgba(15, 15, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 15px 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    gap: 20px;
    max-width: 1600px; /* Header specific wider limit */
    padding: 0 40px;
}

@media (max-width: 1200px) {
    .main-nav ul {
        gap: 30px;
    }
}

@media (max-width: 1024px) {
    .site-header {
        background: var(--dark-bg); /* Ensure logo is visible on tablets even if not scrolled */
        padding: 15px 0;
    }
    .main-nav ul {
        gap: 15px;
    }
    .main-nav a {
        font-size: 11px;
        letter-spacing: 1px;
    }
    .header-cta .btn-primary {
        padding: 10px 20px;
    }
}

/* Perfect Vertical Alignment for Nav and Logo */
.logo, .main-nav, .header-cta {
    display: flex;
    align-items: center;
}

.logo {
    flex-shrink: 0; /* Keep logo size stable */
}

.mobile-menu-toggle {
    display: none; /* Hidden on desktop */
}

.main-nav {
    margin-left: auto;
    margin-right: auto;
}

.logo img, .custom-logo {
    width: auto;
    max-width: 100%;
    display: block;
}

.logo a {
    font-family: var(--heading-font);
    font-weight: 800;
    font-size: 26px;
    letter-spacing: 3px;
    text-transform: uppercase;
    display: block;
}

.main-nav ul {
    display: flex;
    gap: 60px;
}

.main-nav a {
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    padding: 5px 0;
    color: #ffffff;
    opacity: 0.8;
    transition: var(--transition);
    line-height: 1;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: var(--transition);
    transform: translateX(-50%);
}

.main-nav a:hover {
    opacity: 1;
    color: #ffffff;
}

.main-nav a:hover::after, .main-nav .current-menu-item a::after, .main-nav .active a::after {
    width: 20px;
}

.main-nav a:hover, .main-nav .current-menu-item a, .main-nav .active a {
    color: #ffffff;
    opacity: 1;
}

.header-cta {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-cta .btn-primary {
    font-size: 11px;
    padding: 12px 28px;
    letter-spacing: 1.5px;
    background-color: var(--accent);
    color: #fff;
}

.header-cta .btn-primary:hover {
    background-color: #fff;
    color: var(--dark-bg);
}

/* Hero Section */
.hero {
    height: 100vh;
    min-height: 800px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    color: #fff;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    transition: transform 10s linear;
}

.hero:hover .hero-video {
    transform: scale(1.1);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.2) 80%, transparent 100%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
}

.hero-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 5px;
    margin-bottom: 30px;
    font-weight: 800;
    display: block;
    color: var(--accent);
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.1;
    color: #fff;
    margin-bottom: 25px;
    font-weight: 700;
}

.hero p {
    font-size: clamp(16px, 1.4vw, 19px);
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 650px;
    line-height: 1.6;
}

.hero-btns {
    display: flex;
    gap: 30px;
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 30px;
}

.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 991px) {
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .site-header { 
        background: var(--dark-bg); 
        padding: 12px 0; 
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    
    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 25px;
        height: 18px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        position: relative;
        z-index: 1001;
    }
    .mobile-menu-toggle .bar {
        display: block;
        width: 100%;
        height: 2px;
        background-color: #ffffff;
        transition: all 0.4s ease;
    }
    .mobile-menu-toggle.open .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .mobile-menu-toggle.open .bar:nth-child(2) { opacity: 0; }
    .mobile-menu-toggle.open .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .main-nav { 
        margin-left: 0; /* Reset desktop margin */
        position: fixed; 
        top: 0; 
        left: -100%; 
        width: 100%; 
        height: 100vh; 
        background: rgba(15, 15, 15, 0.98); 
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 100px 30px; 
        transition: left 0.5s cubic-bezier(0.165, 0.84, 0.44, 1); 
        overflow-y: auto; 
        z-index: 999;
    }
    .main-nav.nav-open { left: 0; }
    .main-nav ul { display: flex; flex-direction: column; gap: 30px; align-items: center; justify-content: center; text-align: center; padding: 0; margin: 0; width: 100%; }
    .main-nav a { font-size: 24px; font-family: var(--heading-font); }
    .mobile-menu-cta { display: block !important; border-top: 1px solid #eee; margin-top: 30px; padding-top: 30px; }
    .header-cta .btn-primary { display: none; }
    
    .hero { height: auto; min-height: 100vh; padding: 140px 0 80px; }
    .hero-btns { flex-direction: column; gap: 15px; }
    .hero-btns .btn { width: 100%; justify-content: center; }
    .hero-overlay { background: linear-gradient(to right, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 100%); }
}

/* Story Teaser Widget */
.woodcraft-story-teaser-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 100px;
    align-items: center;
}
@media (max-width: 975px) {
    .woodcraft-story-teaser-grid {
        grid-template-columns: 1fr;
        gap: 50px;
        text-align: center;
    }
}

/* Category Cards */
.category-card {
    position: relative;
    height: 480px;
    border-radius: var(--card-radius);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-medium);
}

.category-card img {
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    max-height: none !important;
    object-fit: cover !important;
    display: block !important;
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.category-card:hover img {
    transform: scale(1.1);
}

.category-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px;
    background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
    color: #fff;
    transition: var(--transition);
}

.category-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 6px;
    background-color: var(--accent);
    transition: var(--transition);
}

.category-card:hover::after {
    width: 100%;
}

.category-card h3 {
    color: #fff;
    margin-bottom: 12px;
}


/* Enhanced Footer */
.site-footer {
    background-color: #0a0a0a;
    color: rgba(255, 255, 255, 0.6);
    padding: 100px 0 0px;
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 80px;
    margin-bottom: 80px;
}

.footer-brand .footer-logo img {
    height: 60px;
    width: auto;
    margin-bottom: 30px;
    filter: brightness(0) invert(1); /* Ensure it stays white */
}

.footer-brand p {
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 30px;
    max-width: 320px;
}

.site-footer h4 {
    color: #ffffff;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 35px;
    font-weight: 800;
}

.footer-links ul, .footer-contact ul {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-links a, .footer-contact a {
    font-size: 15px;
    transition: var(--transition);
    display: block;
}

.footer-links a:hover, .footer-contact a:hover {
    color: #ffffff;
    transform: translateX(5px);
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    font-size: 15px;
}

.footer-contact i {
    color: var(--accent);
    width: 18px;
    margin-top: 5px;
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.social-links a {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(237, 0, 0, 0.3);
}

.footer-bottom {
    background: #000;
    padding: 30px 0;
    text-align: center;
    font-size: 13px;
    letter-spacing: 0.5px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom a {
    color: #fff;
    font-weight: 700;
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 60px;
    }
}

@media (max-width: 991px) {
    .site-footer {
        padding: 80px 0 0;
        text-align: center;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .footer-brand p {
        margin: 0 auto 30px;
    }

    .footer-brand .footer-logo img {
        margin: 0 auto 30px;
    }

    .social-links {
        justify-content: center;
    }

    .footer-contact li {
        justify-content: center;
    }
    
    .footer-links a:hover, .footer-contact a:hover {
        transform: scale(1.05);
    }
}

/* FAQ Accordion */
.faq-item {
    border-bottom: 1px solid #eee;
    padding: 20px 0;
}

.faq-question {
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-answer {
    padding-top: 15px;
    display: none;
}

.faq-item.active .faq-answer {
    display: block;
}

.faq-item.active .faq-question {
    color: var(--accent);
}

/* Contact Form */
.contact-form-wrapper {
    background: #fdfdfd;
    padding: 40px;
    border-radius: var(--card-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
}

/* --- Layout Reset & Elementor Overrides --- */
.site-main {
    min-height: 70vh;
}

/* Offset for fixed header on standard pages */
body:not(.home) .site-main {
    padding-top: 100px;
}

@media (max-width: 1024px) {
    body:not(.home) .site-main {
        padding-top: 80px;
    }
}

/* No offset for Full Width or Elementor Canvas templates */
.page-template-template-fullwidth .site-main,
.elementor-template-full-width .site-main,
.elementor-canvas .site-main {
    padding-top: 0 !important;
}

/* Fix for Elementor Editor Bar */
/* Admin Bar Support */
.admin-bar .site-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .site-header {
        top: 46px;
    }
}

.elementor-editor-active .site-header {
    margin-top: 0;
}

/* Standard Page UI */
.page-header {
    text-align: center;
    margin-bottom: 60px;
}

.page-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(36px, 5vw, 64px);
    color: var(--dark-bg);
}

.entry-content {
    max-width: 900px;
    margin: 0 auto;
    font-size: 18px;
    line-height: 1.8;
}

/* Ensure Elementor sections take full width */
.elementor-section-full_width {
    width: 100%;
}

[dir="rtl"], .rtl {
    text-align: right;
    direction: rtl;
    font-family: 'Cairo', var(--body-font);
}

[dir="rtl"] h1, 
[dir="rtl"] h2, 
[dir="rtl"] h3, 
[dir="rtl"] h4, 
[dir="rtl"] h5, 
[dir="rtl"] h6 {
    font-family: 'Cairo', var(--heading-font);
}

[dir="rtl"] .main-nav {
    margin-right: auto;
    margin-left: 0;
}

[dir="rtl"] .footer-grid {
    direction: rtl;
}


[dir="rtl"] .lang-switcher {
    margin-right: 0;
    margin-left: 25px;
}

[dir="rtl"] .lang-link.active::after {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}

[dir="rtl"] .hero-overlay {
    background: linear-gradient(to left, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.2) 80%, transparent 100%);
}

[dir="rtl"] .category-card-overlay {
    left: auto;
    right: 0;
}

[dir="rtl"] .category-card::after {
    left: auto;
    right: 0;
}

[dir="rtl"] .footer-links a:hover, 
[dir="rtl"] .footer-contact a:hover {
    transform: translateX(-5px);
}

[dir="rtl"] .footer-contact i {
    margin-right: 0;
    margin-left: 15px;
}

[dir="rtl"] .faq-question .plus-icon {
    margin-left: 0;
    margin-right: 20px;
}

[dir="rtl"] .contact-form-wrapper {
    text-align: right;
}

/* Force right alignment for containers that might have inline centering */
[dir="rtl"] .container, 
[dir="rtl"] .section,
[dir="rtl"] .hero-content {
    text-align: right;
}

/* Maintain centering for specific elements that should stay centered */
[dir="rtl"] .btn,
[dir="rtl"] .icon-wrapper,
[dir="rtl"] .social-links,
[dir="rtl"] .footer-bottom {
    text-align: center;
}

/* Tablet Logo Fix & Adjustments */
@media (max-width: 1024px) {
    .logo img, .custom-logo {
        max-height: 45px;
        width: auto;
    }
}

@media (max-width: 991px) {
    [dir="rtl"] .main-nav {
        left: auto;
        right: -100%;
        transition: right 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    }
    [dir="rtl"] .main-nav.nav-open {
        right: 0;
        left: auto;
    }
    .logo img, .custom-logo {
        max-height: 40px;
    }
}
