:root {
    --color-primary: #1e3d2f;
    /* Deep Forest Green */
    --color-secondary: #f4f7f6;
    /* Mist Grey */
    --color-accent: #cd7f32;
    /* Rich Bronze */
    --color-text: #2c3e50;
    /* Dark Slate for text */
    --color-text-light: #607d8b;
    /* Muted Blue-Grey */
    --color-bg-light: #faf9f6;
    /* Alabaster - Warmer white */
    --color-bg-secondary: #f4f7f6;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    --border-radius: 4px;
    --shadow-soft: 0 10px 30px rgba(30, 61, 47, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: transparent;
    /* Allow video to show through */
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

/* Global Image Styling */
img {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    /* 8% shadow, within 5-10% range */
    border-radius: var(--border-radius);
    /* Soft edges */
}

/* Reset for icons/logos if needed - assuming logo is text or svg not img tag based on previous view */
.logo img {
    box-shadow: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* Header */
header {
    background-color: rgba(250, 249, 246, 0.95);
    /* Alabaster with opacity */
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--color-primary);
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
    transition: 0.3s;
}

/* Hamburger default state (Hidden on desktop) */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 2000;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-primary);
    transition: 0.3s;
}

/* Mobile/Tablet Menu Styles */
@media (max-width: 1024px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        height: 100vh;
        width: 100%;
        /* Full width for better mobile experience */
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        right: 0;
    }

    /* Hamburger Animation to 'X' */
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }
}

.nav-links a {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 1px;
    background-color: var(--color-accent);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Global Video Background */
.video-bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%);
    opacity: 0.95;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* Optional: Global tint if needed */
}

/* Hero Section */
.hero {
    height: 100vh;
    background-color: transparent;
    /* Video is behind */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    /* overflow: hidden; Removed to allow scrolling flow */
}

/* Removed old hero-video styles */

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 3;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-sm);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.9;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--color-accent);
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    border-radius: var(--border-radius);
    transition: background-color 0.3s transform 0.2s;
}

.btn:hover {
    background-color: #b08d65;
    transform: translateY(-2px);
}

/* Intro Section */
.intro {
    padding: var(--spacing-xl) 0;
    text-align: center;
    background-color: rgba(250, 249, 246, 0.85);
    /* Semi-transparent */
    backdrop-filter: blur(5px);
    /* Optional frosted effect */
}

.intro h2 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
    color: var(--color-primary);
}

.intro p {
    max-width: 700px;
    margin: 0 auto;
    color: var(--color-text-light);
    font-size: 1.1rem;
}

/* Collection Grid Layout */
.catalog-section {
    padding: var(--spacing-xl) 0;
    min-height: 100vh;
    background-color: rgba(250, 249, 246, 0.85);
    /* Semi-transparent */
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    font-size: 3rem;
    color: var(--color-primary);
    position: relative;
    padding-bottom: 1rem;
    font-family: var(--font-heading);
    /* Ensure premium font */
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--color-accent);
    margin: 1rem auto 0;
}

/* Premium Collection Grid Layout */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    /* More breathing room */
    max-width: 1400px;
    /* Wider container for impact */
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.product-card {
    display: flex;
    flex-direction: column;
    background: transparent;
    /* Cleaner look, let content breathe */
    text-decoration: none;
    color: inherit;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
}

.product-card:hover {
    transform: translateY(-10px);
}

.card-image-container {
    width: 100%;
    aspect-ratio: 3/2;
    /* Classic photography ratio */
    overflow: hidden;
    border-radius: 4px;
    /* Minimal radius */
    margin-bottom: 1.5rem;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    /* Very subtle initial shadow */
    transition: box-shadow 0.5s ease;
}

.product-card:hover .card-image-container {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
    /* Deep elegant shadow on hover */
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    /* Slower, cinematic zoom */
    display: block;
}

.product-card:hover .card-image {
    transform: scale(1.08);
}

.card-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0 0.5rem;
}

.card-title {
    font-size: 1.8rem;
    margin: 0;
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-weight: 500;
    letter-spacing: -0.5px;
}

.card-specs {
    display: flex;
    gap: 1.2rem;
    font-size: 0.85rem;
    color: var(--color-text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.card-specs span i {
    color: var(--color-accent);
    /* Elegant gold accent */
    margin-right: 6px;
    font-size: 0.8em;
}

.card-description {
    font-size: 1rem;
    color: var(--color-text);
    line-height: 1.6;
    margin: 0;
    opacity: 0.8;
    max-width: 90%;
    font-weight: 300;
}

.card-link {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    align-self: flex-start;
}

.card-link i {
    transition: transform 0.3s ease;
    font-size: 0.9em;
}

.product-card:hover .card-link i {
    transform: translateX(5px);
}

/* Underline effect */
.card-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 1px;
    background-color: var(--color-primary);
    transition: width 0.3s ease;
}

.product-card:hover .card-link::after {
    width: 100%;
}

/* Mobile Layout: Horizontal Scroll Snap */
@media (max-width: 768px) {
    .product-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 1.5rem;
        padding: 2rem 1.5rem;
        /* More padding for shadows */
        margin: 0 -1rem;
        /* Full width */
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .product-grid::-webkit-scrollbar {
        display: none;
    }

    .product-card {
        flex: 0 0 85%;
        scroll-snap-align: center;
        max-width: 320px;
        background: white;
        /* Card bg needed on mobile only for clearer separation? Or keep transparent? Let's try white for mobile card feel */
        padding-bottom: 1rem;
    }

    .card-image-container {
        aspect-ratio: 4/3;
        /* Slightly taller on mobile */
        margin-bottom: 1rem;
    }
}

/* Modal / Lightbox Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 61, 47, 0.95);
    z-index: 2000;
    display: none;
    /* Hidden by default */
    justify-content: center;
    align-items: center;
    padding: var(--spacing-md);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 1000px;
    max-height: 90vh;
    border-radius: var(--border-radius);
    overflow-y: auto;
    display: flex;
    flex-direction: row;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-open .modal-overlay {
    opacity: 1;
}

.modal-open .modal-content {
    transform: translateY(0);
}

.modal-image-container {
    width: 55%;
    background-color: #f0f0f0;
}

.modal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-info {
    width: 45%;
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--color-text);
    z-index: 10;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--color-accent);
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.modal-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--color-text-light);
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

.modal-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.modal-meta i {
    color: var(--color-accent);
}

.modal-desc {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--color-text);
    margin-bottom: 2rem;
}

.modal-price {
    font-size: 2rem;
    font-family: var(--font-heading);
    color: var(--color-primary);
    margin-top: auto;
    margin-bottom: 1rem;
}

@media (max-width: 900px) {
    .modal-content {
        flex-direction: column;
        max-height: 80vh;
    }

    .modal-image-container {
        width: 100%;
        height: 300px;
    }

    .modal-info {
        width: 100%;
    }
}

/* ------------------------
   Professional Footer
   ------------------------ */
footer {
    background-color: #111;
    color: #fff;
    padding: var(--spacing-xl) 0 var(--spacing-md);
    font-size: 0.95rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-col h4 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.footer-desc {
    color: #999;
    line-height: 1.6;
    max-width: 300px;
    margin-top: 1rem;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-links a {
    color: #bbb;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.footer-links a:hover {
    color: var(--color-accent);
    padding-left: 5px;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    color: #bbb;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-item i {
    color: var(--color-accent);
}

.contact-item a {
    color: inherit;
}

.contact-item a:hover {
    color: white;
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: #666;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Mobile Footer */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
        text-align: center;
    }

    .footer-desc {
        margin: 1rem auto;
    }

    .footer-links {
        align-items: center;
    }

    .footer-contact {
        align-items: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Print Styles */
@media print {

    /* Hide UI elements */
    header,
    .btn,
    .link-btn,
    .print-btn-container,
    footer p {
        display: none !important;
    }

    /* Reset layout for print */
    body {
        margin: 0;
        padding: 0;
        background: white;
        color: black;
        font-size: 12pt;
    }

    .container {
        width: 100%;
        max-width: none;
        padding: 0 2cm;
    }

    /* Hero adjustments */
    .hero {
        height: 50vh;
        /* Smaller hero for print */
        background: none !important;
        /* Save ink */
        color: black;
        page-break-after: avoid;
        border-bottom: 2px solid #ccc;
        margin-bottom: 2rem;
    }

    .hero-content h1 {
        color: black;
        text-shadow: none;
        font-size: 32pt;
    }

    .hero-content p {
        color: #333;
    }

    /* Catalog Layout */
    .catalog-section {
        background: white;
        padding: 0;
    }

    .section-title {
        text-align: left;
        font-size: 24pt;
        margin-top: 2rem;
        border-bottom: 1px solid #eee;
    }

    .grid-3 {
        display: block;
        /* Stack items */
    }

    .product-card {
        display: flex;
        /* Horizontal layout for print looks professional */
        flex-direction: row;
        align-items: flex-start;
        page-break-inside: avoid;
        /* Don't split a house across pages */
        box-shadow: none;
        border: 1px solid #ddd;
        margin-bottom: 2rem;
        padding: 0;
    }

    .card-image {
        width: 40%;
        height: 200px;
        /* Fixed height */
        object-fit: cover;
    }

    .card-content {
        width: 60%;
        padding: 1.5rem;
    }

    .card-title {
        font-size: 18pt;
        margin-top: 0;
        color: #000;
    }

    .card-specs {
        color: #000;
        font-weight: bold;
    }

    .card-desc {
        color: #333;
        -webkit-line-clamp: unset;
        line-clamp: unset;
        /* Show full text */
    }

    .card-price {
        color: #000;
        font-weight: bold;
    }

    /* Technical Section */
    .technical-section {
        background: white;
        color: black;
        page-break-before: always;
        /* Start on new page */
    }

    .technical-section h2 {
        color: black !important;
        border-bottom: 1px solid #000;
        padding-bottom: 1rem;
    }

    .technical-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .tech-item h3 {
        color: #000;
        border-bottom: 1px solid #ccc;
        display: inline-block;
        padding-bottom: 0.2rem;
    }

    .tech-item p {
        color: #333;
    }

    .tech-item i {
        display: none;
    }

    /* Footer / Contact for Print */
    #contact {
        background: white !important;
        color: black;
        text-align: left;
        border-top: 2px solid #000;
        margin-top: 2rem;
        padding: 2rem 0;
    }

    #contact h2 {
        font-size: 20pt;
    }

    footer {
        background: white;
        color: black;
        border-top: 1px solid #eee;
    }

    body::after {
        content: "Atlas Cabano Catalog | www.atlascabano.com";
        display: block;
        text-align: center;
        font-size: 10pt;
        color: #999;
        margin-top: 2rem;
    }
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Technical Section Redesign */
.technical-section {
    padding: var(--spacing-xl) 0;
    background-color: rgba(250, 249, 246, 0.85);
    /* Semi-transparent */
}

.technical-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.tech-item {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.tech-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.tech-item h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
}

.tech-item i {
    font-size: 1.5rem;
    color: var(--color-accent);
    background: rgba(205, 127, 50, 0.1);
    padding: 10px;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tech-item p {
    color: var(--color-text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .technical-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .technical-grid {
        grid-template-columns: 1fr;
    }

    .technical-section {
        padding: var(--spacing-lg) 0;
    }
}

.tech-item ul {
    list-style-type: disc;
    padding-left: 1.2rem;
    margin-top: 0.5rem;
}

.tech-item li {
    color: var(--color-text-light);
    font-size: 0.95rem;
    line-height: 1.8;
    /* Increased line spacing */
    margin-bottom: 0.5rem;
}

.tech-item p {
    display: none;
    /* Hide old p if any remains */
}

/* ============================
   Language Switcher & RTL
   ============================ */
.nav-links a:hover {
    color: var(--color-accent);
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: 2rem;
    border-left: 1px solid #ddd;
    padding-left: 1rem;
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--color-text-light);
    padding: 0;
    transition: color 0.3s;
    text-transform: uppercase;
}

.lang-btn:hover,
.lang-btn.active {
    color: var(--color-accent);
    font-weight: 700;
}

/* RTL Support */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .lang-switcher {
    margin-left: 0;
    margin-right: 2rem;
    border-left: none;
    border-right: 1px solid #ddd;
    padding-left: 0;
    padding-right: 1rem;
}

[dir="rtl"] .nav-links {
    flex-direction: row-reverse;
}

[dir="rtl"] .card-specs {
    flex-direction: row-reverse;
    /* Icons fix */
    justify-content: flex-end;
    /* If needed */
}

/* Flip arrows in RTL */
[dir="rtl"] .fa-arrow-right {
    transform: rotate(180deg);
}

[dir="rtl"] .card-specs span i {
    margin-right: 0;
    margin-left: 6px;
}

/* Language Dropdown */
.lang-dropdown {
    position: relative;
    display: inline-block;
}

.lang-drop-btn {
    background: none;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.lang-drop-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.lang-drop-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: #fff;
    min-width: 120px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.1);
    z-index: 2001;
    border-radius: 8px;
    margin-top: 5px;
    overflow: hidden;
}

.lang-drop-content a {
    color: var(--color-text);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    transition: background-color 0.2s;
    text-align: left;
}

.lang-drop-content a:hover {
    background-color: #f1f1f1;
    color: var(--color-primary);
}

.lang-drop-content.show {
    display: block;
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1024px) {
    .lang-dropdown {
        margin-top: 1rem;
    }

    .lang-drop-btn {
        border-color: rgba(0, 0, 0, 0.2);
        font-size: 1.1rem;
        padding: 0.8rem 1.5rem;
    }
}