/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --brand-blue: #003d7a;
    --brand-orange: #ff6600;
    --brand-dark-blue: #002855;
    --brand-light-blue: #0056b3;
    --amsoil-red: #e60000;
    --text-dark: #171717;
    --text-gray: #6b7280;
    --gray-100: #f9fafb;
    --gray-200: #f3f4f6;
    --gray-300: #e5e7eb;
    --gray-400: #d1d5db;
    --gray-700: #374151;
    --gray-900: #111827;
    --max-width: 1280px;
    --purple-gradient-start: #667eea;
    --purple-gradient-end: #764ba2;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: white;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header Styles */
.header {
    background: linear-gradient(180deg, var(--brand-blue) 0%, var(--brand-light-blue) 100%);
    background-image: url('../images/header-texture.avif');
    background-repeat: repeat;
    background-size: auto;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-top {
    padding: .5rem 0;
    text-align: center;
    border-bottom: 1px solid rgba(59, 130, 246, 0.3);
    position: relative;
}

.logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo {
    height: 56px;
    width: auto;
    display: inline-block;
}

.flex-horiz {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.authorized-dealer {
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
    font-style: italic;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

/* Mobile header layout */
@media (max-width: 1023px) {
    .header-top {
        padding: 0.75rem 1rem;
    }
    
    .flex-horiz {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        gap: 1rem;
        width: 100%;
    }
    
    .logo-link {
        justify-content: flex-start;
        grid-column: 1;
    }
    
    .logo {
        height: auto;
        width: 120px;
        max-height: 40px;
    }
    
    .authorized-dealer {
        grid-column: 2;
        text-align: center;
        font-size: 1rem;
        white-space: nowrap;
    }
    
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        grid-column: 3;
        justify-self: end;
        top: auto;
        right: 0;
        transform: none;
        padding: 0.5rem;
    }
    
    .nav-menu a {
        font-size: 1.5rem !important;
    }
}

/* Navigation */
.navbar {
    border-top: 1px solid rgba(59, 130, 246, 0.3);
}

.nav-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    padding: 0.875rem 1.25rem;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    background-color: rgba(255,255,255,0.1);
    color: #ffffff;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--brand-orange);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-menu a:hover::after {
    width: 80%;
}

.nav-menu .divider {
    width: 1px;
    height: 20px;
    background: rgba(96, 165, 250, 0.4);
    margin: 0 0.5rem;
}

.icon-link {
    display: flex !important;
    align-items: center;
    gap: 0.25rem;
}

.icon-link svg {
    width: 16px;
    height: 16px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    position: relative;
    min-height: 40px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: white;
    margin: 4px 0;
    transition: 0.3s;
}

/* Show hamburger menu only on mobile */
@media (min-width: 1024px) {
    .mobile-menu-toggle {
        display: none !important;
    }
}

/* Hero Section */
.hero-section {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    overflow: hidden;
}

.hero-link {
    display: block;
    width: 100%;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.hero-link:hover {
    opacity: 0.95;
}

.hero-image-container {
    position: relative;
    width: 100%;
    /* 7:2 aspect ratio for desktop (2/7 = 0.2857 = 28.57%) */
    padding-bottom: 28.57%;
    overflow: hidden;
    background: #0A344C; /* Fallback color */
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Mobile hero with different image and aspect ratio */
@media (max-width: 768px) {
    .hero-image-container {
        /* 5:8 aspect ratio for mobile (8/5 = 1.6 = 160%) */
        padding-bottom: 160%;
    }
    
    /* Hide desktop image */
    .hero-image.desktop-hero {
        display: none;
    }
    
    /* Show mobile image */
    .hero-image.mobile-hero {
        display: block;
    }
}

/* Hide mobile image on desktop */
@media (min-width: 769px) {
    .hero-image.mobile-hero {
        display: none;
    }
    
    .hero-image.desktop-hero {
        display: block;
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand-orange), #ff4500);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 102, 0, 0.3);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(255, 102, 0, 0.4);
}

.btn-primary:hover::before {
    left: 100%;
}

/* Vehicle Selector Section */
.vehicle-selector {
    background: linear-gradient(135deg, #0A344C 0%, #063251 100%);
    padding: 3rem 1rem;
    position: relative;
    overflow: hidden;
}

.vehicle-selector::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.3; }
}

.vehicle-selector h1,
.vehicle-heading {
    color: white;
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    position: relative;
    z-index: 1;
    display: inline-block;
    width: 100%;
}

.vehicle-selector h1::after,
.vehicle-heading::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 3px;
    background: var(--brand-orange);
}

.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto 2rem;
    position: relative;
    z-index: 1;
}

.vehicle-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.vehicle-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(255,102,0,0.1));
    opacity: 0;
    transition: opacity 0.3s;
}

.vehicle-card:hover::before {
    opacity: 1;
}

.vehicle-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.vehicle-card img {
    height: 70px;
    width: 100%;
    max-width: 110px;
    object-fit: contain;
    margin-bottom: 0.75rem;
    transition: transform 0.3s ease;
}

.vehicle-card:hover img {
    transform: scale(1.05);
}

.vehicle-card h3 {
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s;
    line-height: 1.2;
}

.vehicle-card:hover h3 {
    color: var(--brand-orange);
}

/* Preferred Customer Section */
.preferred-customer {
    padding: 3rem 1rem;
    background: var(--gray-100);
}

.pc-header-centered {
    text-align: center;
    margin-bottom: 3rem;
}

.pc-header-centered h2 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    line-height: 1.2;
}

.inline-logo {
    height: 2.5rem;
    width: auto;
    vertical-align: middle;
    display: inline-block;
    margin: 0 0.25rem;
}

.pc-header-centered .subtitle {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin: 0;
    font-weight: 600;
}

.pc-cta-centered {
    text-align: center;
    margin-top: 2.5rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}

.text-red {
    color: var(--amsoil-red);
}

.subtitle {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--brand-orange);
    margin-bottom: 1.5rem;
}

.benefits-list {
    list-style: none;
    margin-bottom: 1.5rem;
}

.benefits-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.checkmark {
    color: #10b981;
    font-size: 1.25rem;
    margin-right: 0.75rem;
}

.product-showcase {
    width: 100%;
    border-radius: 0.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Products Section */
.products-section {
    padding: 3rem 1rem;
    background: white;
}

.products-section h2 {
    text-align: center;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
    position: relative;
    padding-bottom: 1rem;
}

.products-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--brand-orange);
}

.section-subtitle {
    text-align: center;
    color: var(--text-gray);
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.product-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    background: white;
    aspect-ratio: 1;
    cursor: pointer;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1;
}

.product-card:hover::before {
    opacity: 1;
}

.product-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.product-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.product-card:hover img {
    transform: scale(1.15) rotate(2deg);
}

.product-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.2), transparent);
    padding: 1rem;
}

.product-overlay p {
    color: white;
    font-weight: 600;
    text-align: center;
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.product-card.special {
    background: var(--brand-orange);
}

/* Equipment Section */
.equipment-section {
    padding: 3rem 1rem;
    background: var(--gray-100);
}

.equipment-section h2 {
    text-align: center;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 2.5rem;
    color: var(--gray-900);
    position: relative;
    padding-bottom: 1rem;
}

.equipment-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--brand-orange);
}

.equipment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.equipment-card {
    position: relative;
    overflow: hidden;
    border-radius: 0.25rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    background: white;
    aspect-ratio: 4/3;
}

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

.equipment-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.equipment-card:hover img {
    transform: scale(1.05);
}

.equipment-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.2), transparent);
    padding: 1rem;
}

.equipment-overlay p {
    color: white;
    font-weight: 600;
    text-align: center;
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Footer */
.footer {
    background: var(--gray-900);
    color: #d1d5db;
    border-top: 4px solid var(--brand-blue);
    padding: 2.5rem 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.footer-column h3 {
    color: white;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 0.5rem;
}

.footer-column a {
    font-size: 0.875rem;
    color: #d1d5db;
    transition: color 0.2s;
}

.footer-column a:hover {
    color: var(--brand-orange);
}

.mt-4 {
    margin-top: 1.5rem;
}

.footer-bottom {
    border-top: 1px solid var(--gray-700);
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-bottom: 0.5rem;
}

.footer-bottom a {
    color: #d1d5db;
}

.footer-bottom a:hover {
    color: var(--brand-orange);
}

.text-center {
    text-align: center;
}

/* Responsive Design */
@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr 1fr;
    }

    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .pc-header-centered h2 {
        font-size: 2.75rem;
    }

    .inline-logo {
        height: 3rem;
    }

    .pc-header-centered .subtitle {
        font-size: 1.75rem;
    }

    /* Hero image handled by responsive aspect ratio */
}

@media (min-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .vehicle-grid {
        grid-template-columns: repeat(8, 1fr);
    }
    
    /* Hero image handled by responsive aspect ratio */
    
    .footer-grid {
        grid-template-columns: repeat(7, 1fr);
    }
}

/* Vehicle grid responsive adjustments */
@media (max-width: 1200px) and (min-width: 1024px) {
    .vehicle-grid {
        grid-template-columns: repeat(8, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 1023px) and (min-width: 768px) {
    .vehicle-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 767px) and (min-width: 480px) {
    .vehicle-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.75rem;
    }
    
    .vehicle-card {
        padding: 1rem 0.5rem;
        min-height: 100px;
    }
    
    .vehicle-card img {
        height: 45px;
    }
    
    .vehicle-card h3 {
        font-size: 0.7rem;
    }
}

@media (max-width: 479px) {
    .vehicle-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .vehicle-card {
        padding: 1rem 0.75rem;
        min-height: 100px;
    }
    
    .vehicle-card img {
        height: 50px;
    }
    
    .vehicle-card h3 {
        font-size: 0.75rem;
    }
    
    .vehicle-selector h1,
    .vehicle-heading {
        font-size: 1.5rem;
    }
}

@media (max-width: 1023px) {
    /* Mobile menu toggle handled in header section */
    
    .navbar {
        position: relative;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        background: linear-gradient(180deg, var(--brand-blue) 0%, var(--brand-light-blue) 100%);
        flex-direction: column;
        padding: 1rem 0;
        border-top: 1px solid rgba(59, 130, 246, 0.3);
        z-index: 1000;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-menu a {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid rgba(59, 130, 246, 0.1);
    }
    
    .nav-menu .divider {
        width: 100%;
        height: 1px;
        margin: 0.5rem 0;
    }
    
    /* Hero responsive sizing handled in hero section */
}

@media (max-width: 640px) {
    /* Hero responsive sizing handled in hero section */
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .equipment-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .vehicle-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}