/* Modern Design System for Tadelakt Marrakech - Elegant Dark Theme */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,700;1,400&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    /* Colors */
    --color-primary: #792c1f;
    /* Terracotta */
    --color-secondary: #D4A373;
    /* Sand/Gold */
    --color-accent: #1A1A1A;
    /* Darker accent */
    --color-text: #E0E0E0;
    /* Off-white text */
    --color-text-light: #A0A0A0;
    --color-bg: #0F0F0F;
    /* Elegant Black */
    --color-surface: #1E1E1E;
    /* Slightly lighter for cards */
    --color-white: #FFFFFF;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Playfair Display', serif;

    /* Spacing */
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;

    /* Layout */
    --container-width: 1200px;
    --header-height: 95px;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
    /* Background Image with Overlay */
    background-image: linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.85)), url('../images/tadelakt-marocchino.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
}

p {
    font-weight: 400;
    text-align: justify;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Header */
.site-header {
    background-color: rgba(15, 15, 15, 0.95);
    /* Semi-transparent black */
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo img {
    height: 64px;
}

/* Navigation */
.logo,
.main-nav {
    display: flex;
    align-items: center;
    height: 450px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
}

.main-nav a {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    color: var(--color-text);
}

.main-nav a:hover {
    color: #BF871A;
}

.main-nav li.current a {
    color: #BF871A;
    border-bottom: 2px solid #BF871A;
    padding-bottom: 5px;
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text);
}

/* Hero Section */
.hero {
    position: relative;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-white);
    overflow: hidden;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: var(--spacing-lg);
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--color-white);
    margin-bottom: var(--spacing-md);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

.btn {
    display: inline-block;
    padding: var(--spacing-md) var(--spacing-lg);
    background-color: var(--color-primary);
    color: var(--color-white);
    border-radius: 2px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid var(--color-primary);
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: transparent;
    color: var(--color-primary);
}

/* Sections */
.section {
    padding: var(--spacing-xl) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--color-primary);
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

/* Cards */
.card {
    background: rgba(30, 30, 30, 0.8);
    /* Semi-transparent surface */
    backdrop-filter: blur(5px);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--color-primary);
}

.card-image {
    height: 250px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card-image img {
    transform: scale(1.1);
}

.card-content {
    padding: var(--spacing-md);
    text-align: center;
}

.card-title {
    font-size: 1.2rem;
    font-weight: bold;
    padding: var(--spacing-xl) 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Feature Cards (Zig-Zag Layout) */
.feature-card {
    background-color: rgba(0, 0, 0, 0.55);
    /* Dark background 55% */
    color: var(--color-text);
    /* Light text for readability */
    padding: var(--spacing-xl);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.feature-card.reverse {
    flex-direction: row-reverse;
}

.feature-card h3 {
    color: var(--color-primary);
    /* Terracotta */
    margin-bottom: var(--spacing-md);
}

.feature-card p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: justify;
}

.feature-text {
    flex: 1;
}

.feature-image {
    flex: 1;
    height: auto;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.feature-image img {
    width: 100%;
}

/* Masonry Gallery (Modern Grid) */
.masonry-gallery {
    column-count: 3;
    column-gap: 20px;
}

.masonry-item {
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    height: auto;
    break-inside: avoid;
    margin-bottom: 20px;
    position: relative;
}

.masonry-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.masonry-item:hover {
    transform: translateY(-5px);
}

.masonry-item:hover img {
    transform: scale(1.05);
}

.masonry-item h4 {
    color: var(--color-white);
    margin: 0;
    font-size: 1.2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

@media (max-width: 900px) {
    .masonry-gallery {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .masonry-gallery {
        column-count: 1;
    }
}

.footer-links a {
    color: var(--color-secondary);
    margin: 0 var(--spacing-sm);
}

.social-icons {
    margin-top: var(--spacing-md);
}

.social-icons img {
    width: 30px;
    display: inline-block;
    margin: 0 var(--spacing-sm);
}

/* Responsive */
@media (max-width: 768px) {
    .main-nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: var(--color-surface);
        padding: var(--spacing-md);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }

    .main-nav li {
        border-bottom: 1px solid rgba(121, 44, 31, 0.3);
        padding-bottom: 10px;
        width: 100%;
    }

    .main-nav li:last-child {
        border-bottom: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .feature-card,
    .feature-card.reverse {
        flex-direction: column;
        padding: var(--spacing-md);
    }

    .feature-image {
        height: auto;
        width: 100%;
    }
}

/* Modern Contact Page Styles */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--spacing-xl);
    background: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-info-panel {
    background: linear-gradient(135deg, var(--color-primary), #5a1e15);
    padding: var(--spacing-xl);
    color: var(--color-white);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.contact-info-panel h3,
.contact-info-panel h4 {
    color: var(--color-white);
    margin-bottom: var(--spacing-lg);
}

.contact-info-panel h3 {
    font-size: 2rem;
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: var(--spacing-md);
    font-size: 1.1rem;
}

.info-item i {
    margin-right: var(--spacing-md);
    font-size: 1.5rem;
    opacity: 0.8;
}

.contact-form-panel {
    padding: var(--spacing-xl);
}

.form-group {
    position: relative;
    margin-bottom: var(--spacing-lg);
}

.form-control {
    width: 100%;
    padding: 1rem 0;
    font-size: 1rem;
    color: var(--color-text);
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    outline: none;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: var(--color-primary);
}

.form-label {
    position: absolute;
    top: 1rem;
    left: 0;
    font-size: 1rem;
    color: var(--color-text-light);
    pointer-events: none;
    transition: all 0.3s ease;
}

.form-control:focus~.form-label,
.form-control:valid~.form-label {
    top: -0.5rem;
    font-size: 0.8rem;
    color: var(--color-primary);
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(226, 114, 91, 0.4);
}

@media (max-width: 768px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .contact-info-panel,
    .contact-form-panel {
        padding: var(--spacing-md);
    }
}

/* Footer Styles */
.site-footer {
    background-color: #000;
    padding: 4rem 0 6rem;
    /* Increased bottom padding for PC */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #c9b896;
    font-family: 'Lato', sans-serif;
    backdrop-filter: blur(10px);
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-bottom p {
    text-align: left;
    color: #c9b896;
    margin: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    color: var(--color-secondary);
    font-weight: 700;
    text-align: left;
}

.footer-col p {
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #ccc;
    text-align: left;
}

.footer-col a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-col a:hover {
    color: var(--color-secondary);
}

/* Instagram Section */
.instagram-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.instagram-header span {
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-text);
}

.instagram-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.instagram-grid img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.instagram-grid img:hover {
    transform: scale(1.05);
}

/* Edit Icon Button - Premium & Subtle */
.btn-edit-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.btn-edit-icon:hover {
    transform: scale(1.1);
    background-color: var(--color-secondary);
    color: var(--color-bg);
    border-color: var(--color-secondary);
    box-shadow: 0 0 15px rgba(212, 163, 115, 0.5);
}

.btn-edit-icon svg {
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
    flex-shrink: 0;
}

.feature-card p {
    color: rgb(225 214 214 / 98%);
    font-size: 1em;
    line-height: 2;
    text-align: justify;
    font-weight: 300;
    /* Rend le texte nettement plus fin */
    font-style: italic;
    /* Garde l'effet penché */
    font-family: 'Lora', Georgia, serif;
    /* Exemple de police élégante */
    letter-spacing: normal;
    /* Pas d'espacement des lettres supplémentaire. */
}

.main-nav ul li a {
    color: rgb(225 214 214 / 98%);
    font-size: 1em;
    font-weight: 300;
    /* Rend le texte nettement plus fin */
    font-style: italic;
    /* Garde l'effet penché */
    font-family: 'Lora', Georgia, serif;
    /* Exemple de police élégante */
    letter-spacing: normal;
    /* Pas d'espacement des lettres supplémentaire. */
}

.main-nav ul li a {
    text-transform: none !important;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-col {
        text-align: center;
        border-bottom: 1px solid rgba(121, 44, 31, 0.3);
        padding-bottom: 2rem;
    }

    .footer-col:last-child {
        border-bottom: none;
    }

    .footer-col h3,
    .footer-col p,
    .footer-links-list {
        text-align: center !important;
    }

    .instagram-header {
        justify-content: center;
    }

    /* Footer Mobile Adjustments */
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        padding-bottom: 2rem;
    }

    .footer-bottom p {
        text-align: center !important;
        margin-bottom: 0.5rem;
    }

    .footer-bottom-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
    }

    .footer-bottom-links a {
        margin-left: 0 !important;
    }
}