/* -------------------------------------------------------------------------- */
/* CSS VARIABLES                               */
/* -------------------------------------------------------------------------- */
:root {
    --color-white: #ffffff;
    --color-dark: #1f2937; /* Primary Text */
    --color-brand-red: #8B1A1A; /* Deep Maroon from Logo */
    --color-brand-silver: #a0a0a0; /* Stippled Grey/Silver from Logo */
    --color-light-bg: #f7f7f7; /* Subtle off-white for sections */
    --color-text-secondary: #6b7280;
}

/* -------------------------------------------------------------------------- */
/* BASE & LAYOUT                               */
/* -------------------------------------------------------------------------- */
body {
    margin: 0;
    background-color: var(--color-white);
    color: var(--color-dark);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

h1, h2 {
    font-weight: 900;
}

h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 5px;
}

/* -------------------------------------------------------------------------- */
/* BUTTONS                                  */
/* -------------------------------------------------------------------------- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    text-decoration: none;
    font-weight: 700;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    text-align: center;
}

.btn-primary {
    background-color: var(--color-brand-red);
    color: var(--color-white);
    border: 2px solid var(--color-brand-red);
}

.btn-primary:hover {
    background-color: var(--color-white);
    color: var(--color-brand-red);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-dark);
    border: 2px solid var(--color-dark);
}

.btn-secondary:hover {
    background-color: var(--color-dark);
    color: var(--color-white);
}

/* Small button style for header nav */
.btn.small { 
    font-size: 0.8rem; 
    padding: 8px 15px; 
    /* Enforce vertical dimensions */
    height: 38px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

/* -------------------------------------------------------------------------- */
/* HEADER & NAVIGATION (FINAL SHIFTING FIX)     */
/* -------------------------------------------------------------------------- */
.site-header {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    position: sticky; 
    top: 0;
    background-color: var(--color-white);
    z-index: 100;
    /* CRITICAL FIX: Forces the entire header container to a fixed height */
    height: 75px; 
    box-sizing: border-box;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    /* CRITICAL FIX 1: Ensure main header items are centered */
    align-items: center; 
    /* Push content to the top within the fixed height */
    height: 100%;
}

.logo-link img {
    height: 45px;
    width: auto;
}

.desktop-nav { 
    display: flex;
    /* CRITICAL FIX 2: Ensure nav items are centered */
    align-items: center; 
}

/* CRITICAL FIX 3: Force links to the same height as the small buttons and vertically align content */
.desktop-nav a:not(.btn) {
    color: var(--color-dark);
    text-decoration: none;
    font-weight: 500;
    margin-left: 20px; 
    transition: color 0.3s;
    
    /* Apply padding to create the same vertical space as the buttons */
    padding: 10px 0; 
    
    /* Use Flexbox for guaranteed vertical centering of the text inside the link */
    display: flex; 
    align-items: center;
    height: 18px; /* Approximate line height */
}

.desktop-nav a:hover, .desktop-nav a.active {
    color: var(--color-brand-red);
}

.desktop-nav .btn {
    margin-left: 15px; 
    /* Ensure the button itself is vertically centered if it's slightly taller/shorter */
    align-self: center;
}

/* Hamburger and Mobile Menu */
.hamburger { 
    display: none; 
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-dark);
}

.mobile-nav { 
    display: none; 
    padding: 15px 5%; 
    border-top: 1px solid #eee; 
    background-color: var(--color-light-bg); 
}

.mobile-nav a { 
    display: block; 
    padding: 10px 0; 
    color: var(--color-dark); 
    text-decoration: none; 
    font-weight: 500; 
    border-bottom: 1px dashed #ddd;
}
.mobile-nav a:last-child { 
    border-bottom: none; 
}
.mobile-nav a.active { 
    color: var(--color-brand-red); 
}

/* -------------------------------------------------------------------------- */
/* PORTFOLIO PAGE SECTIONS                        */
/* -------------------------------------------------------------------------- */
.portfolio-header {
    text-align: center;
    padding-top: 60px;
    padding-bottom: 40px;
}

.portfolio-header h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    color: var(--color-brand-red);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding-bottom: 80px;
}

.portfolio-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    text-decoration: none;
    display: block;
}

.portfolio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.portfolio-media {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    background-color: var(--color-dark);
}

.portfolio-media img, .portfolio-media iframe {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    top: 0;
    left: 0;
}

.portfolio-copy {
    padding: 20px;
    background-color: var(--color-white);
    border-top: 4px solid var(--color-brand-red);
    color: var(--color-dark);
}

.portfolio-copy h3 {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 5px;
    color: var(--color-dark);
}

.portfolio-copy p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: 0;
}


/* -------------------------------------------------------------------------- */
/* TICKER FOOTER                               */
/* -------------------------------------------------------------------------- */
.ticker {
    text-align: center; 
    font-size: 1rem; 
    font-weight: 500;
    color: var(--color-white); 
    background: var(--color-dark);
    padding: 20px; 
    letter-spacing: 1px; 
    text-transform: uppercase;
}
.ticker strong { 
    color: var(--color-brand-red); 
    font-weight: 900; 
}


/* -------------------------------------------------------------------------- */
/* MEDIA QUERIES                                */
/* -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .desktop-nav { 
        display: none; 
    }
    .hamburger { 
        display: block; 
    }
    .mobile-nav[hidden] { 
        display: none !important; 
    }
    .mobile-nav:not([hidden]) { 
        display: block; 
    }
    /* Reset the fixed height on mobile to allow the menu to expand */
    .site-header {
        height: auto;
    }
}