/* =============================================
   NOUR ZAYTOUN - Huile d'Olive Extra Vierge
   Styles CSS
   ============================================= */

/* Variables */
:root {
    --gold: #b8965c;
    --gold-light: #d4b47a;
    --olive-dark: #4a5a3c;
    --olive: #6b8e4e;
    --cream: #f9f6f0;
    --terracotta: #c17f59;
    --text-dark: #2c2c2c;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--cream);
    color: var(--text-dark);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--cream);
}
::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 4px;
}

/* =============================================
   ARABIC / BILINGUAL STYLES
   ============================================= */
.ar, .ar-text, .ar-small, .title-ar, .hero-ar, .nav-ar, .logo-ar {
    font-family: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
    direction: rtl;
}

.title-ar {
    display: block;
    font-size: 0.6em;
    color: var(--gold);
    margin-top: 0.3rem;
    font-weight: 400;
}

.section-title .title-ar {
    display: block;
}

.features .section-title .title-ar {
    color: var(--gold-light);
}

.hero-ar {
    display: block;
    font-size: 0.5em;
    margin-top: 0.5rem;
    opacity: 0.9;
}

.hero-subtitle-ar {
    font-family: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
    font-size: 1.3rem;
    font-style: normal;
    opacity: 0.9;
    margin-bottom: 2rem;
    direction: rtl;
    animation: fadeInUp 1s ease 0.6s both;
}

.nav-ar {
    display: block;
    font-size: 0.7em;
    opacity: 0.7;
}

.logo-ar {
    font-size: 0.6em;
    opacity: 0.8;
}

.ar-text {
    display: block;
    font-size: 0.95rem;
    color: #777;
    margin-top: 0.5rem;
    line-height: 1.8;
}

.ar-small {
    display: block;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    margin-top: 0.5rem;
}

.feature-card h3 .ar {
    font-size: 0.8em;
    font-weight: 400;
    color: var(--gold-light);
}

.gallery-overlay .ar {
    font-size: 0.8em;
    opacity: 0.9;
}

.contact-card h3 .ar,
.direction-content h4 .ar,
.map-container h4 .ar {
    font-size: 0.8em;
    color: var(--gold);
    margin-left: 0.5rem;
}

.contact-text .ar,
.direction-content .ar {
    display: block;
    font-size: 0.85em;
    color: #888;
    margin-top: 0.2rem;
}

/* =============================================
   HEADER
   ============================================= */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, rgba(249,246,240,0.98), rgba(249,246,240,0.85));
    backdrop-filter: blur(10px);
    transition: all 0.4s ease;
}

header.scrolled {
    padding: 0.7rem 5%;
    box-shadow: 0 2px 30px rgba(0,0,0,0.08);
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo img {
    height: 60px;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05);
}

.logo-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 2px;
}

/* Navigation */
nav ul {
    display: flex;
    list-style: none;
    gap: 3rem;
}

nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    padding: 0.5rem 0;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* Mobile Menu Button */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-dark);
    transition: all 0.3s ease;
}

/* =============================================
   HERO SECTION
   ============================================= */
.hero {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(74, 90, 60, 0.85) 0%, 
        rgba(107, 142, 78, 0.7) 50%,
        rgba(184, 150, 92, 0.6) 100%
    ), url('../images/moulin.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 2rem;
    max-width: 900px;
}

.hero-logo {
    width: 180px;
    margin-bottom: 2rem;
    animation: fadeInDown 1s ease;
    filter: drop-shadow(0 4px 20px rgba(0,0,0,0.3));
}

.hero h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 4.5rem;
    font-weight: 600;
    letter-spacing: 8px;
    margin-bottom: 1rem;
    text-shadow: 2px 4px 20px rgba(0,0,0,0.3);
    animation: fadeInUp 1s ease 0.3s both;
}

.hero-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    font-weight: 400;
    font-style: italic;
    letter-spacing: 3px;
    margin-bottom: 3rem;
    opacity: 0.95;
    animation: fadeInUp 1s ease 0.5s both;
}

.hero-cta {
    display: inline-block;
    padding: 1rem 3rem;
    border: 2px solid white;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    transition: all 0.4s ease;
    animation: fadeInUp 1s ease 0.7s both;
}

.hero-cta:hover {
    background: white;
    color: var(--olive-dark);
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-indicator span {
    display: block;
    width: 30px;
    height: 50px;
    border: 2px solid rgba(255,255,255,0.6);
    border-radius: 20px;
    position: relative;
}

.scroll-indicator span::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    transform: translateX(-50%);
    animation: scrollDown 2s infinite;
}

/* =============================================
   SECTIONS COMMUNES
   ============================================= */
.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3rem;
    color: var(--olive-dark);
    text-align: center;
    margin-bottom: 1rem;
    letter-spacing: 3px;
}

.section-subtitle {
    text-align: center;
    color: var(--gold);
    font-size: 1.1rem;
    letter-spacing: 2px;
    margin-bottom: 4rem;
}

/* =============================================
   ABOUT SECTION
   ============================================= */
.about {
    padding: 8rem 5%;
    background: var(--cream);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
}

.about-text p {
    font-size: 1.05rem;
    line-height: 2;
    color: #555;
    margin-bottom: 1.5rem;
}

.about-text p:first-child::first-letter {
    font-family: 'Cormorant Garamond', serif;
    font-size: 4rem;
    float: left;
    line-height: 1;
    padding-right: 1rem;
    color: var(--gold);
}

.about-image {
    position: relative;
}

.about-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 20px 20px 60px rgba(0,0,0,0.1);
}

.about-image::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100%;
    height: 100%;
    border: 3px solid var(--gold);
    border-radius: 4px;
    z-index: -1;
}

/* =============================================
   FEATURES SECTION
   ============================================= */
.features {
    padding: 6rem 5%;
    background: linear-gradient(135deg, var(--olive-dark) 0%, var(--olive) 100%);
}

.features .section-title {
    color: white;
}

.features .section-subtitle {
    color: var(--gold-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    max-width: 1100px;
    margin: 0 auto;
}

.feature-card {
    text-align: center;
    padding: 3rem 2rem;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    transition: all 0.4s ease;
    border: 1px solid rgba(255,255,255,0.1);
}

.feature-card:hover {
    transform: translateY(-10px);
    background: rgba(255,255,255,0.1);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--gold);
    border-radius: 50%;
}

.feature-icon svg {
    width: 40px;
    height: 40px;
    fill: var(--gold);
}

.feature-card h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.feature-card p {
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    line-height: 1.8;
}

/* =============================================
   GALLERY SECTION
   ============================================= */
.gallery {
    padding: 8rem 5%;
    background: var(--cream);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Balanced gallery grid */
.gallery-grid-balanced {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
    height: 550px;
}

.gallery-main {
    grid-row: span 2;
}

.gallery-side {
    height: 100%;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-item:hover img,
.gallery-item:hover video {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(74, 90, 60, 0.8), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: flex-end;
    padding: 2rem;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay span {
    color: white;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    letter-spacing: 2px;
}

/* =============================================
   CONTACT SECTION
   ============================================= */
.contact {
    padding: 8rem 5%;
    background: linear-gradient(180deg, #f5f2ec 0%, var(--cream) 100%);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto 3rem;
}

.contact-card {
    background: white;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.contact-card h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem;
    color: var(--olive-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gold);
}

.contact-items {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.contact-text p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

.contact-text a {
    color: var(--olive-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-text a:hover {
    color: var(--gold);
}

/* Directions Card */
.directions-card {
    display: flex;
    flex-direction: column;
}

.directions-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex: 1;
}

.direction-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--cream);
    border-radius: 8px;
}

.direction-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    flex-shrink: 0;
}

.direction-icon.from-khenifra {
    background: linear-gradient(135deg, var(--olive-dark) 0%, var(--olive) 100%);
}

.direction-icon.from-tighssaline {
    background: linear-gradient(135deg, var(--terracotta) 0%, #d4956a 100%);
}

.direction-content h4 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    color: var(--olive-dark);
    margin-bottom: 0.3rem;
}

.direction-content p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

/* Maps Row */
.maps-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.map-container {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.map-container h4 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    color: var(--olive-dark);
    margin-bottom: 1rem;
    text-align: center;
}

.map-frame {
    border-radius: 8px;
    overflow: hidden;
    height: 200px;
}

.map-frame iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.acces-frame {
    border-radius: 8px;
    overflow: hidden;
}

.acces-frame img {
    width: 100%;
    height: auto;
    display: block;
}

/* Old styles kept for compatibility */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-info h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    color: var(--olive-dark);
    margin-bottom: 2rem;
}

.contact-item svg {
    width: 24px;
    height: 24px;
    fill: var(--gold);
    flex-shrink: 0;
    margin-top: 0.3rem;
}

.contact-item p {
    font-size: 1rem;
    color: #555;
    line-height: 1.8;
}

.contact-item a {
    color: var(--olive-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--gold);
}

/* New contact visuals layout */
.contact-visuals {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-map-small {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    height: 220px;
}

.contact-map-small iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.contact-acces {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.contact-acces img {
    width: 100%;
    height: auto;
    min-height: 200px;
    object-fit: contain;
    background: #f0f0f0;
}

.acces-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(74, 90, 60, 0.9), transparent);
    color: white;
    padding: 2rem 1.5rem 1rem;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.contact-map {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.contact-map iframe {
    width: 100%;
    height: 400px;
    border: none;
}

.directions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.direction-card {
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.direction-card h4 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    color: var(--olive-dark);
    margin-bottom: 0.5rem;
}

.direction-card p {
    font-size: 0.9rem;
    color: #666;
}

/* =============================================
   FOOTER
   ============================================= */
footer {
    padding: 4rem 5% 2rem;
    background: var(--olive-dark);
    color: white;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-logo img {
    height: 50px;
    filter: brightness(0) invert(1);
}

.footer-logo span {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    letter-spacing: 2px;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    width: 45px;
    height: 45px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--gold);
    border-color: var(--gold);
}

.social-links svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(10px);
    }
}

@keyframes scrollDown {
    0% {
        opacity: 1;
        top: 8px;
    }
    100% {
        opacity: 0;
        top: 25px;
    }
}

/* Fade in on scroll */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =============================================
   RESPONSIVE DESIGN
   ============================================= */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 3rem;
    }
    
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .maps-row {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr 1fr;
    }

    .gallery-grid-balanced {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        height: auto;
    }

    .gallery-main {
        grid-row: span 1;
        height: 350px;
    }

    .gallery-side {
        height: 280px;
    }

    .gallery-item:first-child {
        grid-column: span 2;
        grid-row: span 1;
    }
}

@media (max-width: 768px) {
    header {
        padding: 1rem;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .logo-ar {
        display: none;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: var(--cream);
        flex-direction: column;
        justify-content: center;
        transition: right 0.3s ease;
        box-shadow: -5px 0 30px rgba(0,0,0,0.1);
    }

    nav.active {
        right: 0;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .menu-toggle {
        display: flex;
        z-index: 1001;
    }

    .hero h1 {
        font-size: 2.5rem;
        letter-spacing: 4px;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-subtitle-ar {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .title-ar {
        font-size: 0.7em;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid-balanced {
        grid-template-columns: 1fr;
        height: auto;
        gap: 1rem;
    }

    .gallery-main {
        height: 300px;
    }

    .gallery-side {
        height: 250px;
    }

    .gallery-item:first-child {
        grid-column: span 1;
    }

    .contact-wrapper {
        gap: 1.5rem;
    }

    .contact-card {
        padding: 1.5rem;
    }

    .maps-row {
        gap: 1.5rem;
    }

    .directions {
        grid-template-columns: 1fr;
    }

    .contact-visuals {
        gap: 1rem;
    }

    .contact-map-small {
        height: 180px;
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .footer-logo span {
        font-size: 1.2rem;
    }
}
