@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;700&display=swap');

:root {
    --primary: #337ab7;
    --primary-dark: #23527c;
    --secondary: #20c997;
    /* Teal for UI elements */
    --secondary-text: #0f7a5b;
    /* Darker teal for text (4.5:1) */
    --accent: #fd7e14;
    /* Orange for UI elements */
    --accent-text: #c05600;
    /* Darker orange for text (4.5:1) */
    --dark: #212529;
    --light: #f8f9fa;
    --gray-100: #e9ecef;
    --gray-600: #6c757d;
    --white: #ffffff;
    --shadow-sm: 0 .125rem .25rem rgba(0, 0, 0, .075);
    --shadow-md: 0 .5rem 1rem rgba(0, 0, 0, .15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, .175);
    --font-main: 'Outfit', sans-serif;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Accessibility: Focus Styles */
*:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* Accessibility: Skip Link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px;
    z-index: 2000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

body {
    font-family: var(--font-main);
    color: var(--dark);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-center {
    text-align: center;
}

.text-primary {
    color: var(--primary);
}

.text-secondary {
    color: var(--secondary-text) !important;
}

.text-accent {
    color: var(--accent-text) !important;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mb-4 {
    margin-bottom: 4rem;
}

.py-5 {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(51, 122, 183, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(51, 122, 183, 0.4);
}

.btn-outline {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: var(--white);
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    width: 100%;
    padding: 0 4%;
    /* More full width feeling */
    max-width: none;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
}

.header-logo-img {
    max-width: 250px;
    height: auto;
    max-height: 60px;
    /* Ensure it doesn't exceed header height */
    width: auto;
}

.logo span {
    color: var(--dark);
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-item {
    position: relative;
    font-weight: 500;
}

.nav-link {
    background: none;
    border: none;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    color: inherit;
    cursor: pointer;
    padding: 0;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link:hover {
    color: var(--primary);
}

/* Dropdown */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--white);
    min-width: 200px;
    box-shadow: var(--shadow-md);
    border-radius: 10px;
    padding: 1rem 0;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

/* Accessibility: Show dropdown only when parent has .is-open class */
.nav-item.is-open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.5rem 1.5rem;
    color: var(--gray-600);
}

.dropdown-item:hover {
    color: var(--primary);
    background-color: var(--gray-100);
}

/* Hamburger */
.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--dark);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    padding: 0;
    /* Remove padding as we use flex centering */
    height: 62vh;
    /* Impactful height */
    min-height: 400px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin-top: 80px;
    /* Offset fixed header */
}

.hero.homepage {
    height: 75vh;
    background-position: top center;
}

/* Overlay for text readability on images */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    /* Dark overlay */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.35rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.hero .section-subtitle {
    color: var(--secondary);
    /* Pop color on dark background */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.hero .text-primary {
    color: var(--white);
    /* Override primary color in hero title */
}

/* Press/Featured In Section */
.press-section {
    padding: 4rem 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-100);
}

.press-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.press-logos img {
    max-width: 100%;
    height: auto;
    opacity: 1;
    filter: grayscale(100%);
}

.press-logos img:hover {
    opacity: 1;
    filter: grayscale(0%);
}

/* Section General */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: var(--dark);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 0.5rem;
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--white);
    border-radius: 20px;
    padding: 0;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--gray-100);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Ensure image respects radius */
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.card-img-top {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.card-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.card p {
    color: var(--gray-600);
    margin-bottom: 2rem;
    flex-grow: 1;
}

.brand-logo {
    max-height: 60px;
    width: auto;
    margin-bottom: 2rem;
    display: block;
    margin-left: 0;
    margin-right: auto;
}

.brand-image-container {
    border-radius: 20px;
    overflow: hidden;
    min-height: 400px;
    box-shadow: var(--shadow-lg);
}

.brand-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 768px) {
    .brand-image-container {
        min-height: 300px;
        /* Adjust height for mobile to prevent large gaps */
    }
}

/* Contact Form */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--gray-100);
    border-radius: 8px;
    font-family: var(--font-main);
    transition: var(--transition);
}

.form-input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(51, 122, 183, 0.1);
}

textarea.form-input {
    min-height: 150px;
    resize: vertical;
}

/* Footer */
footer {
    background-color: var(--dark);
    color: var(--white);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand h2 {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--white);
    max-width: 300px;
}

.footer-col h3 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col a {
    color: var(--white);
}

.footer-col a:hover {
    color: var(--primary);
}

.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        gap: 0;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-md);
        height: calc(100vh - 80px);
        overflow-y: auto;
        padding-bottom: 2rem;
    }

    .nav-menu.active {
        left: 0;
        top: 80px;
        /* Ensure strictly anchored */
    }

    .nav-item {
        margin: 0;
        width: 100%;
        border-bottom: 1px solid var(--gray-100);
    }

    .nav-link {
        display: block;
        padding: 1.5rem;
        font-size: 1.1rem;
    }

    .dropdown-menu,
    .nav-item .dropdown-menu {
        position: static;
        box-shadow: none;
        transform: none;
        opacity: 0;
        visibility: hidden;
        display: none;
        /* Hidden by default */
        background-color: var(--light);
        width: 100%;
        min-width: unset;
        top: unset;
        left: unset;
        padding: 0;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        border-radius: 0;
    }

    /* Make sure it's displayed when open or active */
    .nav-item.is-open .dropdown-menu,
    .nav-item.active .dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
    }

    /* Keep hidden on generic hover without active class (optional, but good for touch anomalies) */
    .nav-item:hover .dropdown-menu {
        display: none;
    }

    .dropdown-item {
        padding: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
}