/* --- Responsive Adjustments --- */

/* --- Default Styles (Ensure hamburger is hidden on desktop) --- */
.menu-toggle {
    display: none; /* Hidden by default */
}

@media (max-width: 992px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2.4rem; }
    section h2 { font-size: 2.4rem; }
    .hero-content h2 { font-size: 1.4rem; }
    .navbar { padding: 0 2rem; }
    main { padding: 0 2rem; margin: 4rem auto; }
    .section-container { padding: 3rem 2rem; }

    .logo-main { font-size: 1.4rem; letter-spacing: 1.5px; } 
    .logo-sub { font-size: 0.75rem; letter-spacing: 0.8px; }
    .logo-image { width: 45px; height: 45px; padding: 3px; border-width: 3px; }
    .logo-image::before { margin: -3px; }
    .nav-links li { margin-left: 2rem; }
    .nav-links a { font-size: 1rem; }
    .nav-links .nav-button { padding: 0.6rem 1.2rem; font-size: 0.85rem; margin-left: 2rem; }
    .hero-photo { width: 240px; height: 240px; border-width: 6px; padding: 6px; margin-bottom: 3rem;} 
    .hero-photo::before { margin: -6px; }
}

@media (max-width: 768px) {
    body { line-height: 1.7; }
    header {
        padding: 0.8rem 0;
        position: relative; /* Keep relative for absolute positioning of menu */
    }

    .navbar {
        /* Ensure row layout and space between */
        display: flex; /* Make sure display:flex is explicit here */
        flex-direction: row; 
        justify-content: space-between; 
        align-items: center;
        padding: 0 1.5rem; /* Keep padding */
    }
    
    .logo-container { 
        margin-bottom: 0; /* Remove bottom margin */
        width: auto; /* Ensure it doesn't take full width */
        flex-shrink: 0; /* Prevent shrinking if space is tight */
    } 

    .menu-toggle {
        display: block; /* Show hamburger */
        color: var(--text-primary); /* Use theme text color */
        font-size: 1.8rem; /* Adjust size */
        /* Basic button reset */
        background: none;
        border: none;
        cursor: pointer;
        padding: 0.5rem;
        line-height: 1;
    }

    .nav-links-container {
        max-height: 0;
        overflow: hidden;
        visibility: hidden; /* Add visibility hidden */
        transition: max-height 0.3s ease-in-out, visibility 0s linear 0.3s; /* Delay visibility transition */
        position: absolute;
        top: 100%; /* Position below the header */
        left: 0;
        right: 0;
        background-color: var(--bg-secondary); /* Use defined variable */
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        padding: 0 0; /* Padding when closed */
        z-index: 1000; 
        border-bottom-left-radius: 8px; /* Use px value */
        border-bottom-right-radius: 8px; /* Use px value */
    }

    .nav-links-container.nav-open {
        max-height: 400px; /* Adjust as needed, ensure this is enough */
        visibility: visible; /* Make visible when open */
        padding: 1rem 0; /* Restore padding when open */
        transition: max-height 0.3s ease-in-out, visibility 0s linear 0s; /* Visibility transition for opening */
    }

    /* Styles for the list *inside* the container */
    .nav-links { 
        flex-direction: column; 
        width: 100%; 
        margin: 0; /* Reset margins/padding */
        padding: 0;
        align-items: center; 
        list-style: none; /* Ensure list style is none */
        float: none; /* Ensure no floats */
    }
    
    .nav-links li { 
        margin: 0; /* Reset list item margin */
        width: 100%;
        text-align: center;
    }
    
    .nav-links li a { 
        display: block; /* Make link fill list item */
        padding: 0.8rem 1rem;
        width: 100%;
        border-bottom: 1px solid var(--border-color); /* Use existing border color var */
        /* Ensure default link styles are applied */
        color: var(--text-secondary);
        font-weight: 500;
        font-size: 1rem; /* Slightly smaller for mobile */
        position: relative;
        text-decoration: none;
    }
    /* Remove underline effect from header.css for mobile */
     .nav-links a:not(.nav-button)::before {
        display: none;
    }

    .nav-links li:last-child a {
        border-bottom: none; /* Remove border from last item */
    }

    .nav-links .nav-button { 
        /* Adjust button style for dropdown */
        margin: 1rem auto 0.5rem; /* Add margin */
        display: inline-block; /* Change from block */
        width: auto; /* Let button size naturally */
        padding: 0.7rem 1.5rem; /* Keep padding */
        text-align: center;
        /* Ensure base button styles are present if needed*/
         border: 1px solid var(--accent-luxury);
         color: var(--accent-luxury);
         border-radius: 6px;
         font-weight: 600;
         transition: all 0.3s ease;
         text-transform: uppercase;
         font-size: 0.9rem; /* Slightly smaller */
         letter-spacing: 0.5px;
    }
     .nav-links .nav-button:hover {
        background-color: var(--accent-luxury);
        color: var(--bg-primary); /* Use primary bg for contrast */
        box-shadow: 0 0 15px var(--glow-color-luxury);
    }

    /* --- Keep other existing 768px rules, ensure they don't conflict --- */
    main { padding: 0 1.5rem; margin: 3rem auto; }
    section { margin-bottom: 4rem; }
    .section-container { padding: 3rem 1.5rem; }

    h1 { font-size: 2.5rem; }
    h2 { font-size: 2.1rem; }
    section h2 { font-size: 2.1rem; }
    h3 { font-size: 1.5rem; }

    #hero .section-container { padding: 4rem 1.5rem; border-radius: 8px; }
    .hero-content h2 { font-size: 1.2rem; }
    .hero-photo { width: 200px; height: 200px; border-width: 5px; padding: 5px; } 
    .hero-photo::before { margin: -5px; }

    .portfolio-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .portfolio-item img.portfolio-image { height: 220px; }

    /* Remove horizontal padding for portfolio section on mobile */
    #portfolio .section-container {
        padding-left: 0;
        padding-right: 0;
    }

    .testimonials-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .testimonial-photo { float: none; display: block; margin: 0 auto 1rem; width: 80px; height: 80px; }
    .testimonial-item p:first-of-type { padding-top: 0.5rem; font-size: 0.95rem; }
    .testimonial-author { text-align: center; }

    #contact .section-container { border-radius: 8px; }
}

@media (min-width: 1400px) {
    .navbar, main, .section-container {
        max-width: 1300px; /* Ensure consistency */
    }
    h1 { font-size: 4rem; }
    h2 { font-size: 3rem; }
    section h2 { font-size: 3rem; }
    h3 { font-size: 1.8rem; }
    .hero-content h2 { font-size: 1.8rem; }
}
