@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #004892; /* New Holland Blue */
    --secondary: #FFCC00; /* New Holland Yellow */
    --dark: #0a1118;
    --light: #f8f9fa;
    --text: #333;
    --text-light: #fff;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text);
    background-color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* --- Typography --- */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}

/* --- Layout --- */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    padding: 20px 0;
    transition: var(--transition);
}

header.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 10px 0;
    box-shadow: 0 4px 30px rgba(0,0,0,0.1);
    color: var(--dark);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-light);
    transition: var(--transition);
}

header.scrolled .logo {
    color: var(--primary);
}

.logo span {
    color: var(--secondary);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

header.scrolled .nav-links a {
    color: var(--dark);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

/* --- Hero Section --- */
.hero {
    height: 70vh;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('hero-tractor.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    color: var(--text-light);
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease-out, shimmer 3s infinite linear;
    background: linear-gradient(90deg, #fff 0%, var(--secondary) 50%, #fff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
    animation: fadeInUp 1.2s ease-out;
}

.btn {
    display: inline-block;
    padding: 15px 40px;
    background: var(--primary);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    border: 2px solid var(--primary);
    transition: var(--transition);
}

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

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

/* --- Sections --- */
section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.section-title .bar {
    width: 80px;
    height: 4px;
    background: var(--secondary);
    margin: 0 auto;
}

/* --- Footer --- */
footer {
    background: var(--dark);
    color: white;
    padding: 80px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h4 {
    margin-bottom: 25px;
    color: var(--secondary);
}

.footer-col ul li {
    margin-bottom: 15px;
    opacity: 0.7;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.5;
}

/* --- Features --- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: var(--transition);
    border: 1px solid #eee;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
}

.feature-card .icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    margin-bottom: 15px;
    color: var(--primary);
}

.feature-card p {
    font-size: 0.95rem;
    opacity: 0.8;
}

/* --- Page Headers --- */
.page-header {
    background: linear-gradient(rgba(0,48,146,0.9), rgba(0,48,146,0.9)), url('background.png');
    background-size: cover;
    background-position: center;
    padding: 150px 0 80px;
    color: white;
    text-align: center;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto;
}

/* --- Services List --- */
.service-item {
    display: flex;
    align-items: center;
    gap: 60px;
    margin-bottom: 100px;
}

.service-item.reverse {
    flex-direction: row-reverse;
}

.service-text {
    flex: 1;
}

.service-text h2 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.service-text ul {
    margin-top: 20px;
}

.service-text ul li {
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}

.service-text ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary);
    font-weight: bold;
}

.service-img {
    flex: 1;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.service-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: var(--transition);
}

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

/* --- Parts Catalog --- */
.category-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
}

.filter-btn {
    padding: 10px 25px;
    border-radius: 50px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.parts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.part-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    transition: var(--transition);
}

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

.part-img {
    height: 200px;
    background: #f1f1f1;
    overflow: hidden;
}

.part-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.part-info {
    padding: 20px;
}

.part-info h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.part-info p {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 15px;
}

.stock-status {
    display: block;
    font-size: 0.8rem;
    color: #28a745;
    margin-bottom: 15px;
    font-weight: 600;
}

.btn-small {
    padding: 8px 20px;
    font-size: 0.85rem;
}

/* --- Service Details --- */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

.service-card {
    background: #fdfdfd;
    padding: 40px;
    border-radius: 20px;
    border-left: 5px solid var(--primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}

.appointment-cta {
    background: var(--primary);
    color: white;
    padding: 60px;
    border-radius: 30px;
    text-align: center;
}

.appointment-cta h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.appointment-cta p {
    margin-bottom: 30px;
    opacity: 0.9;
}

/* --- Contact Content --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
}

.contact-form-area, .contact-info-area {
    background: white;
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 20px;
}

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

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(0,72,146,0.1);
}

.info-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.info-item .icon {
    font-size: 1.5rem;
}

/* --- Homepage Additions --- */
.services-preview {
    padding: 0;
    margin-top: -50px; /* Pull up to overlap hero slightly */
    position: relative;
    z-index: 10;
}

.services-grid-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.service-box {
    height: 200px;
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    background: var(--dark);
}

.service-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    opacity: 0.7;
}

.box-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 72, 146, 0.9));
    color: white;
    transition: var(--transition);
}

.service-box:hover img {
    transform: scale(1.1);
    opacity: 1;
}

.service-box h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.service-box p {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-bottom: 10px;
}

.box-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.homepage-contact {
    background: #f1f3f6;
    padding: 80px 0;
}

.contact-grid-home {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 40px;
}

.contact-card-home, .map-card-home {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.05);
}

.map-card-home {
    padding: 10px; /* Minimal padding for the map */
}

.contact-card-home {
    max-width: 100%; /* Reset max-width to allow grid to control it */
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.home-contact-form input, .home-contact-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

.home-contact-form input:focus, .home-contact-form textarea:focus {
    border-color: var(--primary);
}

.home-contact-form .btn {
    width: 100%;
    margin-top: 20px;
}

/* --- Animations --- */
.feature-card, .section-title, .service-box, .contact-card-home, .map-card-home {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.feature-card.animate, .section-title.animate, .service-box.animate, .contact-card-home.animate, .map-card-home.animate {
    opacity: 1;
    transform: translateY(0);
}

/* --- WhatsApp Float --- */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #128c7e;
    color: #FFF;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .nav-links { display: none; }
    .hero-content h1 { font-size: 3rem; }
}

@media (max-width: 768px) {
    .hero-content h1 { font-size: 2.2rem; }
    .hero-content p { font-size: 1rem; }
    .btn { padding: 12px 30px; font-size: 0.9rem; }
    .contact-grid-home { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    header { padding: 10px 0; }
    .logo { font-size: 1.1rem; }
    .contact-btn .btn { 
        padding: 8px 12px; 
        font-size: 0.8rem; 
        min-width: unset;
    }
    .hero { height: 60vh; }
    .hero-content h1 { font-size: 1.8rem; }
}
