/* CSS Custom Properties */
:root {
    --clr-green: #367C2B;      /* John Deere green */
    --clr-red: #C31F17;        /* Case IH red */
    --clr-blue: #0C2C94;       /* New Holland blue */
    --clr-slate: #444A57;      /* Dark slate for "Tractors" */
    --clr-john-deere: #367C2B;
    --clr-case-ih: #C31F17;
    --clr-new-holland: #0C2C94;
    --clr-neutral: #444A57;    /* Other equipment button */
    --clr-hopper: #1A1A1A;     /* black for Hoppers */
    --clr-flatbed: #F5A623;    /* construction yellow for Flatbeds */
    --clr-dryvan: #2E5A83;     /* steel-blue for Dry Vans */
    --radius: 8px;
    --shadow: 0 3px 6px rgba(0,0,0,.2);
    --max-width: 1200px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    letter-spacing: normal;
}

/* Header Styles */
header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--spacing-sm) var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    color: var(--clr-green);
    text-decoration: none;
}

.logo a {
    color: inherit;
    text-decoration: none;
}

/* Logo styling */
.logo-link {
    display: inline-block;
    text-decoration: none;
}

.site-logo-image {
    max-height: 64px;
    height: auto;
    width: auto;
}

/* Mobile logo adjustments */
@media (max-width: 768px) {
    .site-logo-image {
        max-height: 48px;
    }
    
    .header-container {
        padding: var(--spacing-xs) var(--spacing-sm);
    }
    
    .header-nav {
        gap: var(--spacing-sm);
    }
    
    .header-nav a {
        font-size: 0.9rem;
    }
    
    .contact-link {
        font-size: 0.8rem;
    }
}

/* Color-coded site logo - keeping for legacy support */
.site-logo {
    font-family: 'Inter', sans-serif;
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 700;
    margin: 0;
    text-decoration: none;
}

.site-logo .green { color: var(--clr-green); }
.site-logo .red   { color: var(--clr-red); }
.site-logo .blue  { color: var(--clr-blue); }
.site-logo .slate { color: var(--clr-slate); }

.header-nav {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.header-nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.header-nav a:hover {
    color: var(--clr-green);
}

.contact-link {
    font-size: 0.9rem;
}

/* Hero Section */
.hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    background-image: url('public/assets/field.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: var(--max-width);
    width: 100%;
    padding: 0 var(--spacing-md);
}

.hero-headline {
    font-size: clamp(2rem, 5vw, 4rem);
    margin-bottom: var(--spacing-xl);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
}

/* Button Styles */
.btn {
    padding: var(--spacing-md) var(--spacing-xl);
    border: none;
    border-radius: var(--radius);
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 1px;
    color: white;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    min-width: 150px;
}

.btn:hover {
    transform: scale(1.04);
    box-shadow: 0 6px 12px rgba(0,0,0,.3);
}

.btn-green {
    background-color: var(--clr-green);
}

.btn-red {
    background-color: var(--clr-red);
}

.btn-blue {
    background-color: var(--clr-blue);
}

.btn-neutral {
    background-color: var(--clr-neutral);
}

.btn.hopper {
    background: var(--clr-hopper);
}

.btn.flatbed {
    background: var(--clr-flatbed);
}

.btn.dryvan {
    background: var(--clr-dryvan);
}

/* Listings Section */
#listings {
    max-width: var(--max-width);
    margin: var(--spacing-xl) auto;
    padding: 0 var(--spacing-md);
}

.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background-color: #f8f9fa;
}

.card-content {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: var(--spacing-xs);
    color: var(--clr-green);
}

.card-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: var(--spacing-sm);
    line-height: 1.4;
    font-style: italic;
}

.card-details {
    margin: var(--spacing-sm) 0;
    color: #666;
}

.card-price {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--clr-green);
    margin: var(--spacing-sm) 0;
}

.card-price.coming {
    font-style: italic;
    color: var(--clr-slate);
}

.card .btn {
    width: 100%;
    margin-top: auto;
    margin-bottom: 0;
}

/* Color-coded tractor cards */
.card-green {
    border-left: 4px solid var(--clr-green);
}

.card-green h3,
.card-green .card-price {
    color: var(--clr-green);
}

.card-red {
    border-left: 4px solid var(--clr-red);
}

.card-red h3,
.card-red .card-price {
    color: var(--clr-red);
}

.card-blue {
    border-left: 4px solid var(--clr-blue);
}

.card-blue h3,
.card-blue .card-price {
    color: var(--clr-blue);
}

/* Color-coded equipment cards */
.card-hopper {
    border-left: 4px solid #1A1A1A;
}

.card-hopper h3,
.card-hopper .card-price {
    color: #1A1A1A;
}

.card-flatbed {
    border-left: 4px solid #F5A623;
}

.card-flatbed h3,
.card-flatbed .card-price {
    color: #F5A623;
}

.card-dryvan {
    border-left: 4px solid #2E5A83;
}

.card-dryvan h3,
.card-dryvan .card-price {
    color: #2E5A83;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: var(--spacing-xl);
    border-radius: var(--radius);
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.close {
    position: absolute;
    right: var(--spacing-md);
    top: var(--spacing-md);
    font-size: 2rem;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: var(--spacing-sm);
    border: 1px solid #ddd;
    border-radius: var(--radius);
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--clr-green);
    box-shadow: 0 0 0 2px rgba(54, 124, 43, 0.2);
}

/* Footer */
footer {
    background: #333;
    color: white;
    padding: var(--spacing-xl) 0;
    margin-top: var(--spacing-xl);
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--spacing-lg);
}

.footer-blog h4 {
    margin-bottom: var(--spacing-sm);
    color: var(--clr-green);
}

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

.footer-blog li {
    margin-bottom: var(--spacing-xs);
}

.footer-blog a {
    color: #ccc;
    text-decoration: none;
}

.footer-blog a:hover {
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: var(--spacing-sm);
        text-align: center;
    }
    
    .header-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 360px) {
    :root {
        --spacing-sm: 0.75rem;
        --spacing-md: 1rem;
        --spacing-lg: 1.5rem;
        --spacing-xl: 2rem;
    }
    
    .listings-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading states */
.loading {
    text-align: center;
    padding: var(--spacing-xl);
    color: #666;
}

.error {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--clr-red);
    background: #fee;
    border-radius: var(--radius);
    margin: var(--spacing-lg) 0;
}

.empty-state {
    text-align: center;
    padding: var(--spacing-xl);
    color: #666;
    background: #f8f9fa;
    border-radius: var(--radius);
    margin: var(--spacing-lg) 0;
}

/* Breadcrumb Styling */
.breadcrumbs {
    margin: 1rem 0 2rem 0;
    font-size: 0.9rem;
    color: #666;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #e9ecef;
}

.breadcrumbs a {
    color: var(--clr-primary);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

/* FAQ Section Styling */
.faq {
    max-width: 800px;
    margin: 3rem auto;
    padding: 2rem 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.faq h2 {
    text-align: center;
    color: var(--clr-primary);
    margin-bottom: 2rem;
    font-size: 2rem;
}

.faq details {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq details:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.faq details[open] {
    border-color: var(--clr-primary);
}

.faq summary {
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--clr-primary);
    background: #f8f9fa;
    border: none;
    outline: none;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.faq summary:hover {
    background: #e9ecef;
}

.faq summary::marker {
    display: none;
}

.faq summary::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--clr-primary);
    transition: transform 0.3s ease;
}

.faq details[open] summary::after {
    transform: rotate(45deg);
}

.faq details p {
    padding: 1.5rem;
    margin: 0;
    line-height: 1.6;
    color: #666;
    border-top: 1px solid #e9ecef;
}

/* Mobile responsive fixes */
@media (max-width: 768px) {
    .hero {
        min-height: 60vh;
        padding: 2rem 1rem;
    }
    
    .hero-content {
        padding: 2rem 1rem;
    }
    
    .hero-headline {
        font-size: 2rem;
        margin-bottom: 1rem;
        line-height: 1.2;
    }
    
    .seo-intro {
        font-size: 1rem !important;
        margin: 1rem 0 1.5rem !important;
        line-height: 1.5 !important;
    }
    
    .hero-buttons {
        margin-bottom: 1rem;
        margin-top: 1rem;
    }
    
    .listings-grid {
        margin-top: 1rem;
    }
    
    .btn {
        min-width: 120px;
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    #listings {
        margin-top: 1rem;
        padding-top: 1rem;
    }
    
    /* Equipment page specific spacing */
    .internal-nav-section {
        padding: 1rem 0;
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 55vh;
        padding: 1.5rem 0.5rem;
    }
    
    .hero-content {
        padding: 1.5rem 0.5rem;
    }
    
    .hero-headline {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }
    
    .seo-intro {
        font-size: 0.95rem !important;
        margin: 0.75rem 0 1.25rem !important;
    }
    
    .hero-buttons {
        margin-bottom: 1rem;
        margin-top: 1rem;
    }
    
    .listings-grid {
        margin-top: 1rem;
    }
    
    .btn {
        min-width: 100px;
        padding: 0.5rem 0.75rem;
        font-size: 0.95rem;
    }
    
    #listings {
        margin-top: 1rem;
        padding-top: 1rem;
    }
    
    /* Equipment page specific spacing for very small screens */
    .internal-nav-section {
        padding: 1rem 0;
        margin-bottom: 1rem;
    }
}

/* Cross-navigation links styling */
.internal-nav {
    text-align: center;
    margin: 3rem auto 2rem auto;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    max-width: 600px;
    font-size: 1.1rem;
    border-left: 4px solid var(--clr-primary);
}

.internal-nav a {
    color: var(--clr-primary);
    text-decoration: none;
    font-weight: 600;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.internal-nav a:hover {
    background: var(--clr-primary);
    color: white;
    text-decoration: none;
}
