:root {
    --bg-color: #fdfdfb;
    --text-color: #1a1a1a;
    /* Colors extracted from your logo */
    --logo-teal: #1e4d57;
    --logo-orange: #d94e28;
    --logo-gold: #f9ab32;
    --border-color: #e5e5e5;
    --serif-font: 'Georgia', serif;
    --sans-font: 'Helvetica Neue', Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--sans-font);
    line-height: 1.8;
}

/* Navbar with Logo Integration */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
}

.nav-logo-img {
    height: 50px; /* Adjust based on preference */
    width: auto;
}

.nav-links { display: flex; list-style: none; }
.nav-links li { margin-left: 2.5rem; }
.nav-links a { 
    text-decoration: none; 
    color: var(--text-color); 
    font-size: 0.9rem; 
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.nav-links a:hover { color: var(--logo-orange); }

/* Hero Section */
.hero {
    padding: 8rem 10%;
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
}

.hero h1 {
    font-family: var(--serif-font);
    font-size: 3.5rem;
    font-weight: normal;
    margin-bottom: 2rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.25rem;
    color: var(--logo-teal); /* Using teal for the sub-headline */
    max-width: 700px;
    margin: 0 auto;
    border-left: 4px solid var(--logo-gold); /* Gold accent flair */
    padding-left: 20px;
}

/* Portfolio Grid */
.container { padding: 5rem 5%; }

h2 {
    font-family: var(--serif-font);
    font-size: 2rem;
    font-weight: normal;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--logo-teal);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 4rem;
}

.card {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    transition: transform 0.3s ease;
}

.card:hover { transform: translateY(-5px); }

.card p {
    font-size: 0.8rem;
    color: var(--logo-orange); /* Orange for category labels */
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
}

.card h3 {
    font-family: var(--serif-font);
    font-size: 1.6rem;
    font-weight: normal;
    margin: 0.5rem 0 1rem 0;
}

.card .btn {
    display: inline-block;
    text-decoration: none;
    color: var(--logo-teal);
    font-weight: bold;
    font-size: 0.8rem;
    text-transform: uppercase;
    border-bottom: 2px solid var(--logo-gold); /* Gold underline button */
    padding-bottom: 2px;
    transition: border-color 0.3s;
}

.card .btn:hover { border-color: var(--logo-orange); }

/* --- STREAMLINED FOOTER STYLES --- */

.site-footer {
    background-color: #EACFA6;
    color: white;
    padding: 3rem 5% 1.5rem 5%; /* Reduced padding to make it shorter */
    margin-top: 5rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr; /* Switched to 3 columns */
    gap: 3rem;
    align-items: start;
}

.footer-logo {
    height: 230px; /* Increased size from 60px */
    width: auto;
    margin-bottom: 1rem;
}

.footer-brand p {
    font-size: 0.85rem;
    opacity: 0.9;
    line-height: 1.5;
    max-width: 280px;
}

.footer-nav h4 {
    font-family: var(--serif-font);
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--logo-teal);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-nav ul {
    list-style: none;
}

.footer-nav li {
    margin-bottom: 0.5rem;
}

.footer-nav a {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.8;
    transition: color 0.3s;
}

.footer-nav a:hover {
    color: var(--logo-orange);
    opacity: 1;
}

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0 auto; /* Reduced margin */
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.75rem;
    opacity: 0.6;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-brand p {
        margin: 0 auto;
    }
}

/* Contact Section Styling */
.contact-section {
    background-color: #ffffff;
    padding: 8rem 5%;
}

.contact-wrapper {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-header {
    text-align: left;
}

.contact-header h2 {
    text-align: left;
    margin-bottom: 1.5rem;
    color: var(--logo-teal);
}

.contact-header p {
    font-size: 1.1rem;
    color: var(--text-color);
}

/* Editorial Form Styling */
.editorial-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    font-weight: bold;
    color: var(--logo-orange);
}

.form-group input, 
.form-group textarea {
    padding: 0.8rem;
    border: none;
    border-bottom: 1px solid var(--border-color);
    background: transparent;
    font-family: var(--sans-font);
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus, 
.form-group textarea:focus {
    outline: none;
    border-bottom: 2px solid var(--logo-gold);
}

.submit-btn {
    background-color: var(--logo-teal);
    color: white;
    padding: 1rem;
    border: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 1rem;
}

.submit-btn:hover {
    background-color: var(--logo-orange);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.project-card-img {
    width: 100%;
    height: 250px; /* Adjust height as needed */
    object-fit: cover; /* This crops the image to fill the space without stretching */
    margin-bottom: 1.5rem;
    border-radius: 4px; /* Optional: adds a very slight soft edge */
    transition: opacity 0.3s ease;
}

.card:hover .project-card-img {
    opacity: 0.8;
}

/* Split Hero Layout */
.hero-split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    padding: 8rem 5%; /* Adjusted padding for better fit */
    max-width: 1200px; /* Wider container for the split view */
    margin: 0 auto;
    text-align: left; /* Alignment change to match Maya Francis aesthetic */
}

.hero-text {
    flex: 1;
}

.hero-image {
    flex: 0 0 350px; /* Fixed width for the headshot */
}

.headshot-img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: 4px; /* Matches your project card style */
    filter: grayscale(10%); /* Keeps the editorial feel */
}

/* Ensure it stacks on mobile devices */
@media (max-width: 768px) {
    .hero-split {
        flex-direction: column-reverse;
        text-align: center;
        padding: 4rem 10%;
    }
    
    .hero-image {
        flex: 0 0 auto;
        width: 250px;
        margin: 0 auto 2rem auto;
    }

    .headshot-img {
        height: 300px;
    }
}

/* About Page Specific Layout */
.about-page {
    max-width: 900px;
    margin: 0 auto;
    padding-top: 8rem;
    padding-bottom: 10rem;
}

.about-header h1 {
    font-family: var(--serif-font);
    font-size: 2.8rem;
    line-height: 1.3;
    margin-bottom: 4rem;
    font-weight: normal;
    color: var(--text-color);
}

.about-content p {
    font-size: 1.15rem;
    margin-bottom: 2rem;
    color: #333;
    max-width: 750px;
}

.about-cta {
    margin-top: 6rem;
    padding-top: 4rem;
    border-top: 1px solid var(--border-color);
}

.about-cta h2 {
    text-align: left;
    margin-bottom: 1rem;
}

.btn-outline {
    display: inline-block;
    margin-top: 2rem;
    padding: 1rem 2rem;
    border: 2px solid var(--logo-teal);
    color: var(--logo-teal);
    text-decoration: none;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.btn-outline:hover {
    background-color: var(--logo-teal);
    color: white;
}

/* --- ABOUT PAGE SPECIFIC STYLES --- */

.about-page {
    max-width: 900px;
    margin: 0 auto;
    padding-top: 5rem;
    padding-bottom: 10rem;
}

.about-featured-image {
    width: 100%;
    margin-bottom: 3rem;
}

.about-img-full {
    width: 100%;
    height: auto;
    max-height: 600px; /* Adjust this to control how much of the screen the image takes */
    object-fit: cover;
    border-radius: 4px;
}

.about-header h1 {
    font-family: var(--serif-font);
    font-size: 2.8rem;
    line-height: 1.3;
    margin-bottom: 3rem;
    font-weight: normal;
    color: var(--text-color);
}

.about-content p {
    font-size: 1.15rem;
    margin-bottom: 2rem;
    color: #333;
    max-width: 750px;
}

.about-cta {
    margin-top: 6rem;
    padding-top: 4rem;
    border-top: 1px solid var(--border-color);
}

.about-cta h2 {
    text-align: left;
    margin-bottom: 1rem;
}

.btn-outline {
    display: inline-block;
    margin-top: 2rem;
    padding: 1rem 2rem;
    border: 2px solid var(--logo-teal);
    color: var(--logo-teal);
    text-decoration: none;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.btn-outline:hover {
    background-color: var(--logo-teal);
    color: white;
}

/* --- CONTACT PAGE SPECIFIC STYLES --- */

.contact-page {
    max-width: 1000px;
    margin: 0 auto;
    padding-top: 8rem;
    padding-bottom: 10rem;
}

.contact-hero {
    margin-bottom: 5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 3rem;
}

.contact-hero h1 {
    font-family: var(--serif-font);
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: normal;
}

.contact-hero p {
    font-size: 1.25rem;
    color: var(--logo-teal);
    max-width: 600px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 5rem;
}

.contact-info h2 {
    text-align: left;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
}

.social-links {
    list-style: none;
    margin-top: 2rem;
}

.social-links li {
    margin-bottom: 1rem;
}

.social-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: bold;
    border-bottom: 1px solid var(--logo-gold);
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--logo-orange);
}

/* Responsive adjustment */
@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .contact-hero h1 {
        font-size: 2.5rem;
    }
}

/* --- TABBED WORK PAGE STYLES --- */

.work-container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 5rem 5%;
    gap: 5rem;
}

.work-sidebar {
    flex: 0 0 300px;
    position: sticky;
    top: 100px;
    height: fit-content;
}

.tab-list {
    list-style: none;
    margin-top: 2rem;
}

.tab-item {
    padding: 1rem 0;
    font-size: 1.1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s;
    color: var(--accent-color);
}

.tab-item:hover {
    color: var(--logo-orange);
    padding-left: 10px;
}

.tab-item.active {
    color: var(--logo-teal);
    font-weight: bold;
    border-bottom: 2px solid var(--logo-gold);
}

.work-content {
    flex: 1;
}

/* Hide panels by default, show when active */
.project-panel {
    display: none;
    animation: fadeIn 0.5s ease;
}

.project-panel.active {
    display: block;
}

.work-hero-img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    margin-bottom: 2rem;
}

.project-meta {
    text-transform: uppercase;
    color: var(--logo-orange);
    letter-spacing: 2px;
    font-weight: bold;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile: Stack them */
@media (max-width: 768px) {
    .work-container {
        flex-direction: column;
    }
    .work-sidebar {
        flex: none;
        position: static;
    }
}

/* --- FOOD PHOTOGRAPHY CAROUSEL --- */

.carousel-container {
    width: 100%;
    overflow-x: auto; /* Enables horizontal scrolling */
    margin-bottom: 3rem;
    padding-bottom: 1rem;
    /* Custom scrollbar styling for a cleaner look */
    scrollbar-width: thin;
    scrollbar-color: var(--logo-gold) transparent;
}

.carousel-track {
    display: flex;
    gap: 1.5rem;
    /* This ensures the images don't shrink and maintain their width */
}

.carousel-img {
    flex: 0 0 auto; /* Prevents images from squishing */
    height: 500px; /* Fixed height for consistency */
    width: auto;
    object-fit: cover;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.carousel-img:hover {
    transform: scale(1.02);
}

/* Hide scrollbar for Chrome/Safari/Edge but keep functionality */
.carousel-container::-webkit-scrollbar {
    height: 6px;
}
.carousel-container::-webkit-scrollbar-thumb {
    background: var(--logo-gold);
    border-radius: 10px;
}

/* --- THE BULLETPROOF CAROUSEL --- */

.carousel-wrapper {
    position: relative;
    width: 100%; /* Keeps it within the 'Work Content' area */
    margin-bottom: 3rem;
    overflow: visible; /* Allows buttons to sit slightly outside if needed */
}

.carousel-window {
    width: 100%;
    overflow: hidden; /* This acts as the 'mask' */
    border-radius: 4px;
}

.carousel-track {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1); /* Smoother slide */
    width: 100%; /* Resets the base width */
}

.carousel-img {
    /* This ensures each image is exactly the width of the window */
    flex: 0 0 100%; 
    width: 100%;
    height: 60vh;
    min-height: 400px;
    object-fit: cover;
    pointer-events: none;
}

/* --- UNIVERSAL EDITORIAL NAV ARROWS --- */

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    
    /* Darker glassmorphism for contrast on white ads */
    background: rgba(0, 0, 0, 0.4); 
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    
    /* White arrow icon */
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    
    width: 55px;
    height: 55px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 30;
    
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    transition: all 0.3s ease;
    
    /* Shadow helps define the shape on white backgrounds */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.carousel-btn:hover {
    background: var(--logo-teal); /* Brand color feedback */
    border-color: var(--logo-teal);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.carousel-btn.prev { left: 25px; }
.carousel-btn.next { right: 25px; }

/* Optional: Make arrows slightly more visible only on the Rolex tab specifically */
#rolex .carousel-btn {
    background: rgba(30, 77, 87, 0.6); /* Use your brand teal with transparency */
}

/* Removing default button outlines for a cleaner look */
.carousel-btn:focus {
    outline: none;
}

/* Hide on mobile where swiping is more natural */
/* Scaled arrows for mobile screens */
@media (max-width: 768px) {
    .carousel-btn { 
        width: 40px; 
        height: 40px; 
        font-size: 1.2rem;
        display: flex; /* Ensures they stay visible */
    }
    .carousel-btn.prev { left: 10px; }
    .carousel-btn.next { right: 10px; }
}

/* --- DOCUMENT VIEWER STYLES --- */

.project-split {
    display: grid;
    grid-template-columns: 1fr 1.2fr; /* Text on left, PDF on right */
    gap: 4rem;
    align-items: start;
}

.pdf-viewer-container {
    width: 100%;
    background: #eee;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
    height: 600px;
}

.pdf-viewer-container iframe {
    display: block;
}

/* Mobile: Stack the text and PDF */
@media (max-width: 900px) {
    .project-split {
        grid-template-columns: 1fr;
    }
    
    .pdf-viewer-container {
        height: 500px;
    }
}

/* --- PORTRAIT AD SCALING --- */

.carousel-img.portrait-ad {
    flex: 0 0 100%;
    width: 100%;
    height: 75vh; /* Slightly taller to make the text readable */
    object-fit: contain; /* CRITICAL: This ensures the WHOLE image shows without cropping */
    background-color: #fff; /* Matches the white background of your ads */
}

/* Ensure the track doesn't add extra padding that pushes things off-screen */
.carousel-track {
    align-items: center;
}

/* --- CADILLAC IMAGE HANDLING --- */
.project-split {
    display: grid;
    grid-template-columns: 1fr 1.2fr; /* Matches the Lavanda layout */
    gap: 4rem;
    align-items: start; /* Keeps text at the top */
}

.project-image-full {
    width: 100%;
}

.project-image-full img {
    width: 100%;
    height: auto;
    max-height: 80vh; 
    object-fit: contain;
    border-radius: 4px;
}

/* --- FIXED ASPECT RATIO VIDEO --- */

.video-container-full {
    width: 100%;
    aspect-ratio: 16 / 9; /* This forces the 16:9 widescreen shape immediately */
    margin-bottom: 2.5rem;
    background-color: #000;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    position: relative;
}

.self-hosted-video {
    width: 100% !important;
    height: 100% !important; /* Fills the 16:9 container perfectly */
    object-fit: cover; /* Ensures no black bars if the file is slightly off-ratio */
    display: block;
}

/* --- HOBBY GALLERY STYLES --- */

.hero-mini {
    text-align: center;
    margin-bottom: 4rem;
}

.hobby-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.hobby-item {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    background: #fff;
    border: 1px solid var(--border-color);
    line-height: 0;
}

.hobby-item img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hobby-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0;
    transition: opacity 0.3s ease;
    line-height: 1.2;
}

.hobby-item:hover img {
    transform: scale(1.05);
}

.hobby-item:hover .hobby-caption {
    opacity: 1;
}

/* Mobile Tweak */
@media (max-width: 768px) {
    .hobby-grid {
        grid-template-columns: 1fr;
    }
}

/* --- MOBILE NAVIGATION REPAIR --- */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 1rem;
    }

    .nav-logo-img {
        height: 40px;
        margin-bottom: 1rem;
    }

    .nav-links {
        width: 100%;
        justify-content: center;
        gap: 1rem;
    }

    .nav-links li {
        margin-left: 0;
        font-size: 0.8rem;
    }
}

/* --- MOBILE WORK PAGE STACKING --- */
@media (max-width: 768px) {
    .work-container {
        flex-direction: column;
        padding-top: 2rem;
        gap: 2rem;
    }

    .work-sidebar {
        width: 100%;
        position: static;
    }

    .tab-list {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        gap: 1rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid var(--border-color);
        -webkit-overflow-scrolling: touch; /* Smooth swipe for iOS */
    }

    .tab-item {
        border-bottom: none;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .tab-item.active {
        border-bottom: none;
        background: var(--logo-teal);
        color: white;
        border-radius: 20px;
    }
}

/* --- GLOBAL RESPONSIVE REFINEMENTS --- */
@media (max-width: 768px) {
    /* Hero Section */
    .hero-split {
        flex-direction: column-reverse;
        padding: 4rem 5%;
        text-align: center;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero-image {
        flex: 0 0 auto;
        width: 200px;
        margin-bottom: 2rem;
    }

    .headshot-img {
        height: 300px;
    }

    /* Contact Section on Home */
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    /* About Page Featured Image */
    .about-img-full {
        max-height: 400px;
    }
}