/* =====================
Dark Agency Theme: Colors
===================== */
:root {
    --color-dark-bg: #121212;
    --color-dark-surface: #1E1E1E;
    --color-text-light: #F0F0F0;
    --color-text-dim: #A0A0A0;
    --color-accent: #00C4FF; /* Bright Blue/Cyan Accent */
    --color-accent-hover: #00a0cc;
    --color-shadow: rgba(0, 0, 0, 0.4);
    --transition-speed: 0.4s;
}

/* =====================
General Styles & Reset (CRITICAL: Box-sizing ensures layout integrity)
===================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; 
    /* Add smooth transitions to commonly changed properties */
    transition: background-color var(--transition-speed), color var(--transition-speed), transform 0.3s;
}

/* AGGRESSIVE VIEWPORT RESET: Ensures no margin/padding on the root containers */
html, body {
    margin: 0; 
    padding: 0;
    padding-top: 2rem;
    /* Prevents horizontal scrollbars from appearing if an element peeks out */
    overflow-x: hidden; 
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--color-text-light);
    background-color: var(--color-dark-bg);
    scroll-behavior: smooth;
    padding-top: 5rem; /* Added padding to account for fixed header */
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    text-align: center;
}

/* NEW: Allows the header's inner container to span full width */
.container.header-content-wrapper { 
    width: 100%;
    max-width: none;
    /* CRITICAL FIX LEVEL 1: Aggressively zero out margin, overriding .container margin: auto */
    margin: 0 !important; 
    padding: 0 !important;
}

h1, h2, h3 {
    color: var(--color-text-light);
}

/* =====================
Header (Fixed Position)
===================== */
header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--color-dark-surface);
    box-shadow: 0 4px 15px var(--color-shadow);
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    /* CRITICAL FIX: Ensures alignment across all child elements */
    align-items: center; 
    /* EDITED: Increased vertical padding for a reasonable height, but zero horizontal */
    padding: 0.05rem 0; 
    
    /* CRITICAL FIX LEVEL 2: APPLY NEGATIVE MARGIN TO COUNTER BROWSER DEFAULT SPACE */
    margin-left: -1rem !important; 
    padding-left: 1rem !important; /* Add padding back to keep the content visible, but offset the negative margin */
}

/* =====================
Logo Styling (Flush Left Guaranteed)
===================== */
.logo {
    /* CRITICAL FIX LEVEL 3: Explicitly remove margin/padding from the logo wrapper */
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.logo a {
    text-decoration: none;

    /* We explicitly set the line-height for the link anchor to 1, eliminating extra space */
    line-height: 1; 
    display: flex; /* Treat logo as a small flex container for better vertical centering */
    align-items: center !important;
    /* CRITICAL FIX LEVEL 4: Explicitly remove margin/padding from the anchor link */
    margin-left: 0 !important;
    padding-left: 0 !important;
    padding-top:0px;
}

.logo img {
    /* UPDATED: Larger logo size (85px) */
    height: 85px; /* Standard size */
    width: auto;
    margin-top:10px;
    /* Use display: block to ensure no phantom line-height issues */
    display: block; 
    padding:0;
    transition: height 0.3s ease; 
}

/* Style for the company name next to the logo */
.logo-text {
    font-size: 1.5rem; /* Adjust size as needed */
    font-weight: 800;
    color: var(--color-text-light); /* Inherit header text color */
    margin-left: 0.5rem; /* Space between the logo icon and the text */
    margin-top: 0; /* Clear default h1 margins */
    margin-bottom: 0; /* Clear default h1 margins */
    line-height: 1; /* Match the logo's line height */
    text-transform: uppercase;
    letter-spacing: 1px;
}


/* =====================
Navigation
===================== */
nav ul {
    display: flex;
    list-style: none;
    /* ADDED: Right padding to push the nav links off the true screen edge */
    padding-right: 0.8rem; 
}

nav ul li {
    margin-left: 2.5rem;
}

nav ul li a {
    text-decoration: none;
    color: var(--color-text-light);
    font-weight: 500;
    padding-bottom: 5px;
    position: relative;
    transition: color 0.3s;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    display: block;
    margin-top: 5px;
    right: 0;
    background: var(--color-accent);
    transition: width 0.3s ease;
}

nav ul li a:hover {
    color: var(--color-accent);
}

nav ul li a:hover::after {
    width: 100%;
    left: 0;
    right: auto;
}

/* Hamburger Menu (unchanged) */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    height: 3px;
    width: 25px;
    background: var(--color-accent);
    margin-bottom: 5px;
    border-radius: 5px;
    transition: 0.3s;
}

/* =====================
Hero Section - Enhanced (changed: added margin auto for centering)
===================== */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.85)), url('img/abstract-bg.jpg') center/cover no-repeat fixed; 
    text-align: center;
    color: #FFFFFF;
    padding: 0 1rem;
    margin-top: -5rem; 
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    /* FIX: Add margin: 0 auto to center the block element */
    margin: 0 auto; 
}

.hero h1 {
    font-size: 4.5rem; 
    line-height: 1.1;
    margin-bottom: 1.5rem; 
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #FFFFFF;
    text-shadow: 0px 4px 10px rgba(0, 0, 0, 0.4);
    animation: fadeInSlideUp 1s ease-out forwards;
}

.hero p {
    font-size: 1.8rem; 
    margin-bottom: 3.5rem;
    color: #E0E0E0;
    font-weight: 300;
    letter-spacing: 1px;
    animation: fadeIn 1.5s ease-out forwards 0.3s;
    opacity: 0;
}

.cta-btn {
    padding: 1.2rem 3.5rem;
    font-size: 1.2rem;
    background: linear-gradient(45deg, var(--color-accent), #00A6CC); 
    color: var(--color-dark-bg);
    text-decoration: none;
    font-weight: 700;
    border-radius: 6px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    box-shadow: 0 8px 25px rgba(0, 196, 255, 0.3);
    transition: all 0.4s ease-out;
    animation: scaleIn 0.8s ease-out forwards 0.6s;
    opacity: 0;
    transform: scale(1) translateY(0); 
    display: inline-block;
}

.cta-btn:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 196, 255, 0.6);
    filter: brightness(1.1);
}

/* Keyframe Animations */
@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1; 
    }
}

/* =====================
Sections (unchanged)
===================== */
section {
    padding: 7rem 0;
}

.container h2 {
    font-size: 3rem;
    margin-bottom: 3rem;
    position: relative;
}

.container h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--color-accent);
    margin: 10px auto 0;
}

/* =====================
Services (unchanged)
===================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--color-dark-surface);
    padding: 2.5rem 1.5rem;
    border-radius: 8px;
    border-bottom: 3px solid transparent;
    transition: transform 0.4s, box-shadow 0.4s, border-bottom 0.4s;
}

.service-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 15px 30px var(--color-shadow);
    border-bottom: 3px solid var(--color-accent);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.service-card h3 {
    margin-bottom: 0.5rem;
}

.service-card p {
    color: var(--color-text-dim);
}

/* =====================
Portfolio (unchanged)
===================== */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 15px var(--color-shadow);
}

.portfolio-item img {
    width: 100%;
    display: block;
    filter: brightness(0.7);
    transition: transform 0.6s, filter 0.6s;
}

.portfolio-item:hover img {
    transform: scale(1.05);
    filter: brightness(1);
}

.portfolio-overlay {
    background: rgba(18, 18, 18, 0.9);
    color: #FFFFFF;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h3 {
    margin-bottom: 0.5rem;
}

.view-btn {
    padding: 0.6rem 2rem;
    background-color: var(--color-accent);
    color: var(--color-dark-bg);
    border-radius: 4px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.3s, background-color 0.3s;
}

.view-btn:hover {
    transform: translateY(-3px);
    background-color: var(--color-accent-hover);
}

/* =====================
About (Team Member Fix)
===================== */
.about p {
    color: var(--color-text-dim);
    line-height: 1.8;
}

.team-member {
    text-align: center;
    background: var(--color-dark-surface);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 5px 10px var(--color-shadow);
}

.team-member img {
    width: 120px;
    height: 120px;
    margin-bottom: 1rem;
    border: 3px solid var(--color-accent);
    /* RESTORE: Circular images */
    border-radius: 50%;
    object-fit: cover;
}

.team-member p {
    color: var(--color-accent);
    font-style: italic;
}


/* =====================
Contact (unchanged)
===================== */
.contact-form input,
.contact-form textarea {
    padding: 1rem;
    border: 1px solid var(--color-text-dim);
    background-color: var(--color-dark-surface);
    color: var(--color-text-light);
    border-radius: 4px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--color-accent);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 196, 255, 0.3);
}

.submit-btn {
    padding: 1rem;
    background: var(--color-accent);
    color: var(--color-dark-bg);
    border-radius: 4px;
    font-weight: 700;
    border: none;
    cursor: pointer;
}

.submit-btn:hover {
    transform: translateY(-5px);
    background-color: var(--color-accent-hover);
    box-shadow: 0 10px 25px rgba(0, 196, 255, 0.4);
}

.social-icons a {
    color: var(--color-text-dim);
    font-size: 1.5rem;
    margin: 0 0.8rem;
    transition: color 0.3s, transform 0.3s;
}

.social-icons a:hover {
    color: var(--color-accent);
    transform: scale(1.2);
}

/* =====================
Footer (unchanged)
===================== */
footer {
    background-color: var(--color-dark-surface);
    color: var(--color-text-light);
    padding: 2rem 0;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    list-style: none;
    display: flex;
}

.footer-links li {
    margin-left: 1rem;
}

.footer-links a {
    color: var(--color-text-dim);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--color-accent);
}

/* =====================
Responsive Styles
===================== */
@media (max-width: 768px) {
    /* Header/Nav Adjustments */
    .header-container {
        /* Removed horizontal padding on the container */
        padding: 0.5rem 0; 
        
        /* CRITICAL FIX LEVEL 2: APPLY NEGATIVE MARGIN TO COUNTER BROWSER DEFAULT SPACE */
        margin-left: -1rem !important; 
        padding-left: 1rem !important; /* Add padding back to keep the content visible, but offset the negative margin */
    }
    
    .logo {
        margin-left: 0 !important; /* Mobile Fix */
        padding-left: 0 !important; /* Mobile Fix */
    }
    
    .logo img {
        /* UPDATED: Increased mobile logo height to 65px */
        height: 65px; 
    }
    
    .logo-text {
        font-size: 1.2rem; /* Reduce font size on mobile */
    }

    nav {
        position: relative;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%; /* Position right below the header */
        left: 0;
        background-color: var(--color-dark-surface);
        box-shadow: 0 10px 15px var(--color-shadow);
        padding: 1rem 0;
        text-align: left;
    }

    .nav-links.open {
        display: flex;
    }

    nav ul li {
        margin: 0;
        padding: 0.5rem 2rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    nav ul li:last-child {
        border-bottom: none;
    }

    nav ul li a {
        display: block; /* Make links full width */
        width: 100%;
        padding: 0;
    }

    .hamburger {
        display: flex;
        /* For mobile, add some right padding so the hamburger isn't flush */
        padding-right: 0.8rem; 
    }
    
    /* Hamburger animation */
    .hamburger.toggle span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    .hamburger.toggle span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.toggle span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    /* Hero Section Adjustments */
    .hero h1 {
        font-size: 2.5rem;
        letter-spacing: 1px;
    }

    .hero p {
        font-size: 1.2rem;
    }

    /* Section Adjustments */
    section {
        padding: 4rem 0;
    }

    .container h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    /* Footer Adjustments */
    .footer-container {
        flex-direction: column;
        text-align: center;
    }
    .footer-links {
        margin-top: 1rem;
    }
    .footer-links li {
        margin: 0 0.5rem;
    }
    @media (max-width: 600px) {
    
    /* 1. Base Font Size Reduction (Scales everything slightly) */
    /* This makes your 1rem smaller (e.g., 14px instead of 16px) */
    html {
        font-size: 87.5%; /* Changes base 16px to 14px */
    }

    /* 2. Hero Section Scaling */
    /* Making the main headline smaller */
    .hero-content h1 {
        font-size: 2.5rem; /* Reduces size from a desktop value like 4rem */
    }

    /* Reducing space above and below the headline */
    .hero-content {
        padding: 0 1rem;
    }

    /* 3. Section Headings (H2) Scaling */
    .container h2 {
        font-size: 1.8rem; /* Reduces main section headings */
        margin-bottom: 2rem; /* Reduces margin space */
    }

    /* 4. Padding Reduction (Making sections less spaced out) */
    section {
        padding: 4rem 0; /* Reduces top/bottom padding for all sections */
    }

    /* 5. Team Member & CTA Scaling */
    /* Makes the circular image/initials smaller */
    .team-member img {
        width: 90px;
        height: 90px;
        font-size: 2rem; /* Makes initials text smaller */
    }
    
    /* Shrink the main CTA button slightly */
    .cta-btn {
        padding: 1rem 3rem;
        font-size: 1rem;
    }
 }
}
