:root {
    /* Colors - Adapted for Light Theme */
    --color-primary-light: #F8F8F8; /* Very light, almost white for backgrounds */
    --color-secondary-light: #EEEEEE; /* Slightly darker light for elements (header/footer) */
    --color-text-dark: #222222; /* Dark text for general content */
    --color-text-fade-dark: #555555; /* Slightly faded dark text for secondary info */

    /* Existing Accent & Gemstone Colors (can remain as they are for highlights) */
    --color-accent-gold: #D4AF37; /* Rich gold for highlights */
    --color-accent-silver: #C0C0C0; /* Elegant silver for borders/accents */
    --color-sapphire-blue: #004D99; /* Deep sapphire blue */
    --color-pearl-white: #E0E0E0; /* Soft pearl white */

    /* Button Colors (Adjusted for Light Theme) */
    --color-button-primary: var(--color-sapphire-blue); /* Default button color, sapphire works well */
    --color-button-hover: #0066CC; /* Darker sapphire on hover */
    --color-button-secondary-bg: transparent; /* For outlined buttons background */
    --color-button-secondary-text: var(--color-sapphire-blue); /* Text for outlined buttons */

    /* Fonts (Remain the same unless you want to change them) */
    --font-heading-primary: 'Cinzel Decorative', serif; /* Luxurious, ornate for main titles */
    --font-heading-secondary: 'Playfair Display', serif; /* Elegant serif for sub-headings */
    --font-body: 'Montserrat', sans-serif; /* Clean, modern sans-serif for body text */

    /* Spacing */
    --spacing-sm: 10px;
    --spacing-md: 20px;
    --spacing-lg: 40px;
    --spacing-xl: 80px;

    /* Header Height */
    --header-height: 80px; /* Standard header height */
}
/* --- Global Resets & Base Styles --- */
*, *::before, *::after {
    box-sizing: border-box; /* Ensures padding and border are included in element's total width and height */
    margin: 0;
    padding: 0;
}
html {
    scroll-behavior: smooth; /* Smooth scrolling for anchor links */
}
body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--color-text-dark); /* Changed for light theme */
    background-color: var(--color-primary-light); /* Changed for light theme */
    min-height: 100vh; /* Ensure body takes at least full viewport height */
    display: flex;
    flex-direction: column; /* For sticky footer layout */
    overflow-x: hidden; /* Prevent horizontal scroll caused by animations/large elements */
    -webkit-font-smoothing: antialiased; /* Smoother font rendering */
    -moz-osx-font-smoothing: grayscale;
}
/* Base Link Styles */
a {
    color: var(--color-sapphire-blue); /* Using sapphire for links for better contrast on light */
    text-decoration: none;
    transition: color 0.3s ease, transform 0.2s ease;
}
a:hover {
    color: var(--color-button-hover); /* Darker sapphire on hover */
    text-decoration: underline;
    transform: translateY(-1px); /* Subtle lift */
}
/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading-primary);
    color: var(--color-text-dark); /* Changed for light theme */
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); /* Lighter shadow for light background */
}
/* Paragraphs */
p {
    margin-bottom: var(--spacing-md);
    color: var(--color-text-dark); /* Changed for light theme */
}
/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block; /* Removes extra space below images */
}
/* --- Utility Classes --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}
.section-content {
    max-width: 1000px; /* Standard content width for sections */
    margin: 0 auto;
    padding: var(--spacing-lg) var(--spacing-md);
}
/* Base Button Styling */
.btn {
    display: inline-block;
    padding: var(--spacing-md) var(--spacing-lg);
    font-family: var(--font-body);
    font-size: 1em;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); /* Lighter shadow for light background */
}
/* Primary Button (e.g., Request a Quote, Register) */
.btn-primary {
    background-color: var(--color-accent-gold);
    color: var(--color-text-dark); /* Dark text on gold button */
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.btn-primary:hover {
    background-color: #E6C265; /* Lighter gold on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* Slightly stronger hover shadow */
}
/* Secondary Button (e.g., Logout) */
.btn-logout, .btn-register { /* Combined with register as they are both user actions */
    background-color: var(--color-button-primary); /* Sapphire blue */
    color: var(--color-pearl-white); /* Light text on sapphire button */
    border: 1px solid var(--color-sapphire-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 13px;
    font-size: 0.85em; /* Smaller font size for logout/register buttons */
}
.btn-logout:hover, .btn-register:hover {
    background-color: var(--color-button-hover);
    border-color: var(--color-button-hover);
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-decoration: none; /* Remove underline on hover */
}
/* --- Header Styling --- */
.main-header {
    position: fixed; /* Stays at the top when scrolling */
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.95); /* Light background for header */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth on light background */
    z-index: 100; /* Ensure header is on top of everything */
    padding: 0 var(--spacing-md);
    backdrop-filter: blur(5px); /* Frosted glass effect */
    -webkit-backdrop-filter: blur(5px); /* For Safari compatibility */
}
.header-content {
    display: flex;
    justify-content:center;
    gap:15px;
    align-items: center;
    height: 100%;
    max-width: 1400px; /* Wider content area for header */
    margin: 0 auto;
    flex-wrap: nowrap;
    overflow: visible;
}
.main-header .header-content {
    /* FIX: Allow the space between the nav and user-actions to shrink aggressively */
    gap: 5px; /* Reduced overall gap between main sections */
}
/* Logo */
.logo {
    padding-left: 15px;
}
.logo a {
    display: flex;
    align-items: center;
    height: 100%;
    text-decoration: none;
}
.logo img {
    height: 60px; /* Adjust logo height */
    width: auto;
    transition: transform 0.3s ease;
}
.logo img:hover {
    transform: scale(1.05); /* Slight scale on hover */
}
/* Main Navigation */
.main-nav {
    flex-shrink: 1; /* Allow it to shrink if the user-actions need space */
    margin: 0 5px; /* Reduced margins around the nav */
}
.main-nav ul {
    list-style: none;
    display: flex;
    padding-left:0;
    margin:0;
    gap:0;
    align-items: center;
}
.main-nav ul li a {
    padding:10px 12px;
}
.main-nav li {
    padding:0 12px; /* Padding for each nav item */
}
.main-nav li:not(:last-child) {
    border-right:1px solid var(--color-text-fade-dark); /* Subtle divider between nav items */
}
.main-nav .nav-link {
    color: var(--color-text-dark); /* Changed for light theme */
    font-family: var(--font-heading-secondary); /* Use a more elegant font for navigation */
    font-size: 1em;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 5px 0;
    position: relative; /* For underline effect */
    text-decoration: none; /* Remove default underline */
    display: block;
}
.main-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--color-accent-gold);
    transition: width 0.3s ease-in-out;
}
.main-nav .nav-link:hover::after {
    width: 100%;
}

/* --- Language Selector Styling --- */
.language-switcher {
    display: flex;
    margin-left: 8px;
    margin-right:5px;
    flex-shrink:0;
    align-items:center;
    position: relative;
    z-index: 1000; /* Ensure it appears above other elements */
}
/* The Icon Button (Trigger) */
.lang-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    line-height: 0;
    transition: opacity 0.2s;
}
.lang-icon-main {
    width: 25px; 
    height: 25px;
}
/* The Dropdown Panel */
.lang-dropdown-menu {
    position: absolute;
    top: 100%; 
    right: 0; /* Align the dropdown to the right of the button */
    list-style: none;
    padding: 5px; /* Padding inside the box */
    margin-top: 12px; /* Space below the icon */
    background-color: var(--color-primary-light, #fff); 
    border: 1px solid var(--color-accent-silver, #ccc);
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-width: 150px;
    z-index: 10001; /* Ensure it appears above other elements */
    display: none; /* Crucial: Hidden by default, JS handles visibility */
}

/* Active state managed by JS */
.lang-dropdown-menu.visible {
    display: block;
}

/* Styling for the link item (dropdown-item equivalent) */
.lang-option-link {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    text-decoration: none;
    color: var(--color-text-dark, #333);
    font-size: 0.95rem;
    white-space: nowrap;
    border-radius: 4px;
    transition: background-color 0.2s;
    margin-right: 8px; 
    margin-bottom: 4px;
}

.lang-option-link:last-child {
    margin-bottom: 0;
}

.lang-option-link:hover {
    background-color: var(--color-secondary-light, #eee);
    color: var(--color-sapphire-blue, #004D99);
}

.lang-option-link img {
    width: 20px; 
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
}
.user-actions {
    display: flex;
    align-items: center;
    gap:8px;
    white-space: nowrap;
    flex-shrink: 0; 
}
.user-actions .nav-link { /* For login/profile links */
    color: var(--color-text-dark); /* Changed for light theme */
    font-family: var(--font-body);
    font-size: 0.95em;
    letter-spacing: 0.5px;
    white-space: nowrap; /* Prevent wrapping */
}
.logout-form {
    display: inline-block; /* To align button correctly */
}
.btn-logout {
    padding: 10px 15px; /* Smaller padding for logout button */
    font-size: 0.9em;
}
/* Hamburger Menu (hidden by default on desktop) */
.hamburger-menu {
    display: none; /* Hide on desktop */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001; /* Ensure it's above other header elements */
}
.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--color-text-dark); /* Changed for light theme */
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
}
/* --- Main Content Area --- */
main#content {
    flex-grow: 1; /* Allows main content to fill available space */
    padding-top: var(--header-height); /* Push content down to avoid header overlap */
}
main#content.no-header-offset {
    padding-top: 0; /* No offset if class is added */
}
/* --- Footer Styling --- */
.main-footer {
    background-color: var(--color-secondary-light); /* Light background */
    color: var(--color-text-fade-dark); /* Faded dark text */
    padding: var(--spacing-xl) var(--spacing-md) var(--spacing-lg); /* Ample vertical padding */
    text-align: center; /* Default text alignment, will be overridden by grid columns */
    border-top: 1px solid rgba(0, 0, 0, 0.1); /* Subtle top border */
}

/* Updated Footer Layout with Grid */
.footer-grid-container {
    display: grid;
    /* Defines 3 columns: 1.5 parts for about, 1 part for links, 1.5 parts for contact */
    grid-template-columns: 1.5fr 1fr 1.5fr; 
    gap: var(--spacing-lg); /* Space between columns */
    max-width: 1200px; /* Aligns with main content container */
    margin: 0 auto var(--spacing-xl); /* Center the grid, add space before copyright */
    text-align: left; /* Align text within columns to the left by default */
}

.footer-column {
    /* Basic styling for grid columns, ensures content aligns to top */
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Align content to the left within its column */
}

.footer-column h3 {
    font-family: var(--font-heading-secondary); /* Elegant font for headings */
    color: var(--color-text-dark); /* Darker text for headings */
    font-size: 1.2em;
    margin-bottom: var(--spacing-md);
    text-shadow: none; /* Remove any text shadow inherited from general heading styles */
}

/* Footer Logo Section */
.footer-logo {
    margin-bottom: var(--spacing-md);
}

.footer-logo img {
    height: 70px; /* Slightly adjusted logo size for footer */
    width: auto;
    display: inline-block; /* Useful if you want to align text next to it later */
}

.footer-about p {
    font-size: 0.9em;
    line-height: 1.5;
    margin-bottom: var(--spacing-md);
    color: var(--color-text-fade-dark);
}

/* Footer Navigation Links */
.footer-nav-list { /* Explicit class for the UL element */
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column; /* Stack links vertically */
    gap: 10px;
}

.footer-nav-list a {
    color: var(--color-text-fade-dark);
    font-family: var(--font-body);
    font-size: 0.9em;
    transition: color 0.3s ease;
    text-decoration: none; /* No default underline */
}

.footer-nav-list a:hover {
    color: var(--color-accent-gold);
    text-decoration: underline; /* Underline on hover for clarity */
}

/* Footer Contact Info */
.footer-contact-info p {
    font-size: 0.9em;
    margin-bottom: 8px; /* Tighter spacing for individual contact lines */
    line-height: 1.4;
    color: var(--color-text-fade-dark);
}

.footer-contact-info p a {
    color: var(--color-text-dark); /* Darker color for clickable links */
    text-decoration: none; /* No default underline */
    transition: color 0.3s ease;
}

.footer-contact-info p a:hover {
    color: var(--color-accent-gold);
    text-decoration: underline;
}

/* Social Links in Footer */
.social-links {
    margin-top: var(--spacing-md); /* Space above social icons */
    display: flex;
    justify-content: flex-start; /* Align icons to the left within their column */
    gap: var(--spacing-sm); /* Smaller gap between icons */
}

.social-links img {
    width: 28px; /* Slightly smaller social icons */
    height: 28px;
    transition: transform 0.3s ease;
}

.social-links img:hover {
    transform: scale(1.15); /* Slightly more pronounced zoom on hover */
}

/* Copyright Section */
.copyright {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: var(--spacing-md);
    font-size: 0.8em; /* Slightly smaller copyright text */
    color: var(--color-text-fade-dark);
    text-align: center; /* Center copyright text always */
    margin-top: var(--spacing-md); /* Space between main footer content and copyright */
}
/* Tawk.to chat icon */
.tawk-button {
    /* Sets the size of the minimized bubble/icon wrapper */
    width: 50px !important; /* Change this to your desired size */
    height: 50px !important; /* Change this to your desired size */
    /* Adjust position if needed, as default might rely on 64px size */
    right: 20px !important; 
    bottom: 20px !important;
}

/* Target the iframe itself to ensure it fills the container */
.tawk-button iframe {
    width: 100% !important;
    height: 100% !important;
}
/* Floating Bouncing TEST Badge */
.test-badge {
    background-color: #ff4d4d; /* Bright Red */
    color: white;
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
    font-size: 0.9em;
    text-transform: uppercase;
    white-space: nowrap;
    
    /* CRITICAL: Ensure it doesn't block clicks to navigation or buttons */
    user-select: none;
    pointer-events: none; 
}

/* On mobile, make it slightly smaller so it takes up less space while moving */
@media (max-width: 768px) {
    .test-badge {
        padding: 5px 8px;
        font-size: 0.7em;
    }
}

/* --- Responsive Design for Footer --- */
@media (max-width: 1024px) {
    .footer-grid-container {
        grid-template-columns: 1fr; /* Stack columns into a single column */
        gap: var(--spacing-lg); /* Maintain gap between stacked sections */
        text-align: center; /* Center content when stacked */
    }

    .footer-column {
        align-items: center; /* Center content within each stacked column */
    }

    .footer-column h3 {
        margin-bottom: var(--spacing-sm); /* Reduce margin below headings when stacked */
    }

    .footer-about p {
        max-width: 80%; /* Constrain width of about text for readability on smaller screens */
        margin-left: auto;
        margin-right: auto;
    }

    .footer-nav-list {
        flex-direction: row; /* Keep nav links horizontal, allowing wrap */
        flex-wrap: wrap;
        justify-content: center; /* Center the horizontal nav links */
        gap: 15px; /* Adjust gap for horizontal wrap */
    }
    
    .social-links {
        justify-content: center; /* Center social icons when stacked */
    }
}

@media (max-width: 768px) {
    .main-footer {
        padding: var(--spacing-lg) var(--spacing-sm); /* Reduce overall footer padding on smaller devices */
    }
    .footer-grid-container {
        margin-bottom: var(--spacing-lg); /* Reduce margin before copyright */
    }
    .footer-column h3 {
        font-size: 1.1em;
    }
    .footer-about p,
    .footer-nav-list a,
    .footer-contact-info p {
        font-size: 0.85em; /* Further reduce font sizes for smaller screens */
    }
    .social-links img {
        width: 25px;
        height: 25px;
    }
    .copyright {
        font-size: 0.75em;
    }
}
/* --- Scrollbar Styling (Optional, but adds a custom touch) --- */
/* For WebKit browsers (Chrome, Safari) */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--color-primary-light); /* Changed for light theme */
}
::-webkit-scrollbar-thumb {
    background: #A8A9AD;
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: #D4AF37;
}
/* --- Responsive Design for Base Elements --- */
@media (max-width: 1024px) {
    :root {
        --header-height: 70px;
    }
    .main-header {
        height: var(--header-height);
    }
    .logo img {
        height: 50px;
    }
    .main-nav ul {
        gap: var(--spacing-md);
    }
    .main-nav .nav-link {
        font-size: 1em;
    }
    .user-actions {
        gap: var(--spacing-sm);
    }
    .btn-primary, .btn-register {
        padding: 12px 20px;
        font-size: 0.9em;
    }
    .btn-logout {
        padding: 8px 12px;
        font-size: 0.8em;
    }
    .footer-content {
        justify-content: center; /* Center align columns */
        text-align: center;
    }
    .footer-logo, .footer-nav, .footer-contact {
        margin-bottom: var(--spacing-lg); /* Add margin when stacked */
    }
}

@media (max-width: 1200px) {
    :root {
        --header-height: 65px;
    }
    .main-header {
        padding: 0 var(--spacing-sm);
        height: var(--header-height);
    }
    
    /* Ensure all key elements are positioned correctly */
    .header-content {
        justify-content: space-between !important; /* Spread logo, lang, and toggle */
        gap:5px;
        padding-left: 20px;
        padding-right: 20px;
    }

    /* Hide Main Nav and User Actions by default */
    .main-nav, .user-actions {
        display: none; 
    }
    
    /* The Language Switcher is a crucial element and needs to be visible */
    .language-switcher {
        margin-left: auto; /* Push it to the left of the hamburger */
        margin-right: var(--spacing-sm); 
        flex-shrink: 0;
        z-index: 100; /* Ensure the dropdown appears above content */
    }
    
    /* Hamburger & Close Menu */
    .hamburger-menu {
        display: flex; /* Show hamburger menu on mobile */
        margin-left: 0; /* Remove any previous margin */
        flex-shrink: 0;
    }

    /* Active State for Mobile Navigation */
    .main-nav.active, .user-actions.active { 
        display: flex;
        flex-direction: column;
        position: fixed; /* Use fixed for full viewport coverage */
        top: var(--header-height);
        left: 0;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.98); 
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); 
        z-index: 99; /* Below the fixed header (100) */
        overflow-y: auto;
    }
    
    .main-nav.active {
        padding: var(--spacing-md) 0;
        max-height: calc(100vh - var(--header-height)); /* Ensure it doesn't overlap tawk.to on small screens */
    }

    .main-nav.active ul {
        flex-direction: column;
        gap: 0; /* Let the li padding handle spacing */
        align-items: center;
        width: 100%;
    }
    
    .main-nav.active li {
        width: 100%;
        text-align: center;
        padding: 0; /* Removed list-item padding */
        border-right: none !important; /* Remove separator */
    }
    
    .main-nav.active .nav-link {
        padding: 15px 0; /* Ample tap area */
        display: block;
        font-size: 1.1em;
        width: 100%;
        border-bottom: 1px solid var(--color-secondary-light); /* Separator */
    }
    
    .main-nav.active .nav-link:hover::after {
        width: 0; /* Remove the bottom underline effect on mobile for cleaner look */
    }

    /* Active State for User Actions (below main nav) */
    .user-actions.active { 
        top: calc(var(--header-height) + 330px); /* Position it below the nav */
        padding: var(--spacing-md) 0;
        gap: 15px;
        align-items: center;
        border-top: 1px solid var(--color-secondary-light); /* Separator line */
        box-shadow: none; /* Remove duplicate shadow */
        background-color: var(--color-secondary-light);
        max-height: 150px;
    }
    
    /* Adjust specific elements for mobile */
    .logo img {
        height: 45px;
    }
    .user-actions .nav-link { /* Ensure icon links are visible */
        font-size: 1.1em;
    }
    
    /* Footer responsiveness */
    .footer-content {
        flex-direction: column; 
        align-items: center;
    }
    /* --- New Close Button Styles (for Mobile) --- */
    .close-icon {
        display: none; /* Hidden by default by CSS, JS toggles visibility */
        font-size: 35px;
        font-weight: 200;
        line-height: 1;
        cursor: pointer;
        color: var(--color-text-dark);
        z-index: 1001; /* Ensure it's on top of everything */
        padding: 0 5px;
        transition: transform 0.2s ease;
    }

    .close-icon:hover {
        transform: rotate(90deg);
    }
}

@media (max-width: 480px) {
    .logo img {
        height: 45px;
    }
    .btn {
        padding: 10px 18px;
        font-size: 0.9em;
    }
    .btn-primary, .btn-register {
        padding: 10px 18px;
        font-size: 0.85em;
    }
    .btn-logout {
        padding: 6px 10px;
        font-size: 0.75em;
    }
    /* Assuming these refer to general section headings/paragraphs, adjust if specific classes */
    /* .homepage-section h2 {
        font-size: 1.8em;
    }
    .homepage-section p {
        font-size: 0.9em;
    } */
    .footer-nav ul {
        gap: 10px;
    }
}

/* ---------------------------------------------------------------------- */
/* --- Tawk.to Chat Widget Responsiveness (Global Fix) --- */
/* ---------------------------------------------------------------------- */

/* Target the Tawk.to container for Tablets and Mobiles (Max 768px) */
@media (max-width: 768px) {
    /* CRITICAL: Reduce spacing from bottom and right edges */
    #tawk-max-widget-container {
        /* Move the icon slightly in from the bottom/right corner */
        right: 10px !important; 
        bottom: 10px !important;
    }
    
    /* Constrain the max width of the open chat window on tablets */
    .tawk-widget-max {
        max-width: 90vw !important; 
    }
}

/* Narrow Mobile Fine-Tuning (Max 480px) */
@media (max-width: 480px) {
    /* For the narrowest phones, move it closer to the edge */
    #tawk-max-widget-container {
        right: 5px !important;
        bottom: 5px !important;
    }
}