/* ==========================================================================
   SHIV KRUPA DUDH DAIRY - Main Stylesheet
   Established: 2021 | Kutch, Gujarat
   ========================================================================== */

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

:root {
    /* Colors */
    --primary: #1565C0;
    --primary-rgb: 21, 101, 192;
    --secondary: #42A5F5;
    --accent: #FFC107;
    --white: #FFFFFF;
    --background: #F8FBFF;
    --dark: #1E293B;
    --light-gray: #F1F5F9;
    --border-color: #E2E8F0;
    
    /* Layout */
    --max-width: 1200px;
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    
    /* Shadows & Transitions */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(21, 101, 192, 0.08), 0 4px 6px -2px rgba(21, 101, 192, 0.03);
    --shadow-lg: 0 20px 25px -5px rgba(21, 101, 192, 0.12), 0 10px 10px -5px rgba(21, 101, 192, 0.04);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-blur: blur(12px);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

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

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

ul {
    list-style: none;
}

input, textarea, button {
    font-family: inherit;
    font-size: inherit;
    border: none;
    outline: none;
}

/* 3. Helper/Utility Classes */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 2;
}

.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-accent { color: var(--accent); }

.section-padding {
    padding: 6rem 0;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.75rem;
    position: relative;
    display: inline-block;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--dark);
    max-width: 600px;
    margin: 0 auto 3rem auto;
    font-weight: 400;
    opacity: 0.85;
}

/* 4. Preloader & Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary) 0%, var(--primary) 100%);
    width: 0%;
    z-index: 1001;
    transition: width 0.1s ease;
}

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--background);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(21, 101, 192, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Fade-in Animation Classes */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* 5. Sticky Navigation Bar */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: transparent;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

.header.sticky {
    background-color: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-img {
    height: 50px;
    width: 50px;
    object-fit: contain;
    background-color: var(--white);
    padding: 4px;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--secondary);
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.logo-text span {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--secondary);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--dark);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
}

.bar {
    width: 28px;
    height: 3px;
    background-color: var(--primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* 6. Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    gap: 0.5rem;
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #0d47a1;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background-color: var(--primary);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

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

.btn-accent:hover {
    background-color: #ffb300;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* 7. Hero Banner */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    background: linear-gradient(rgba(21, 101, 192, 0.4), rgba(30, 41, 57, 0.8)), url('../images/hero_bg.jpg') no-repeat center center/cover;
    color: var(--white);
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to top, var(--background) 0%, transparent 100%);
    z-index: 1;
}

.hero-content {
    max-width: 700px;
}

.hero-tagline {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    font-weight: 300;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* 8. Cards & Layout Sections */

/* Glassmorphism Cards */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    border-radius: var(--border-radius-md);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* About Preview on Home */
.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.intro-img-wrapper {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.intro-img-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 10px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    pointer-events: none;
    z-index: 2;
}

.intro-experience-badge {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--primary);
    color: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius-md);
    text-align: center;
    box-shadow: var(--shadow-lg);
    z-index: 3;
    border: 2px solid var(--secondary);
}

.intro-experience-badge h3 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.intro-experience-badge p {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.checklist {
    margin-top: 1.5rem;
    margin-bottom: 2rem;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.checklist-icon {
    color: var(--secondary);
    font-weight: bold;
}

/* Why Choose Us & Business Highlights Grid */
.grid-three {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

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

.feature-icon-box {
    width: 80px;
    height: 80px;
    background-color: rgba(21, 101, 192, 0.06);
    border: 2px solid rgba(21, 101, 192, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    font-size: 2rem;
    color: var(--primary);
    transition: var(--transition);
}

.feature-card:hover .feature-icon-box {
    background-color: var(--primary);
    color: var(--white);
    transform: scale(1.1);
}

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

/* Services section with images */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.service-card {
    background-color: var(--white);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

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

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

.service-body {
    padding: 2rem;
}

.service-title {
    color: var(--primary);
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

/* Stats Counter Section */
.stats-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    padding: 5rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    text-align: center;
}

.stat-num {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--accent);
}

.stat-label {
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* CTA Banner */
.cta-banner {
    position: relative;
    background: linear-gradient(rgba(21, 101, 192, 0.8), rgba(21, 101, 192, 0.9)), url('../images/milk_transport.jpg') no-repeat center center/cover;
    color: var(--white);
    padding: 6rem 0;
}

.cta-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.cta-text {
    max-width: 600px;
}

.cta-text h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Timeline Components (About Page) */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 4rem auto 0 auto;
    padding: 0 1rem;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--secondary);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--white);
    border: 4px solid var(--primary);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.left {
    left: 0;
}

.right {
    left: 50%;
}

.right::after {
    left: -10px;
}

.timeline-content {
    padding: 2rem;
    background-color: var(--white);
    position: relative;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
}

.timeline-year {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

/* 9. Gallery Filters & Lightbox */
.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background-color: var(--white);
    color: var(--dark);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

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

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

.gallery-item {
    position: relative;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    height: 280px;
    cursor: pointer;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(21, 101, 192, 0.9), transparent);
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    color: var(--white);
    transition: var(--transition);
}

.gallery-item:hover .gallery-img {
    transform: scale(1.1);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay h4 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.gallery-overlay p {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Lightbox Modal */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(30, 41, 57, 0.95);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: var(--glass-blur);
}

.lightbox-content-wrapper {
    position: relative;
    max-width: 90%;
    max-height: 85%;
}

.lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-lg);
    border: 3px solid var(--white);
}

.lightbox-close {
    position: absolute;
    top: -45px;
    right: 0;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    background: none;
}

.lightbox-caption {
    color: var(--white);
    text-align: center;
    margin-top: 1rem;
    font-size: 1.1rem;
    font-weight: 500;
}

/* 10. Contact Section Details & Map */
.contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 1.8fr;
    gap: 3.5rem;
    align-items: start;
}

.contact-info-list {
    margin-top: 2rem;
}

.contact-info-item {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.contact-info-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(21, 101, 192, 0.06);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--primary);
    flex-shrink: 0;
    border: 1px solid rgba(21, 101, 192, 0.15);
}

.contact-info-text h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.contact-info-text p {
    color: var(--dark);
    opacity: 0.85;
}

/* Map frame placeholder */
.map-container {
    height: 350px;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-top: 2.5rem;
    border: 1px solid var(--border-color);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 0.85rem 1.25rem;
    border-radius: var(--border-radius-sm);
    border: 1.5px solid var(--border-color);
    background-color: var(--white);
    color: var(--dark);
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(66, 165, 245, 0.15);
}

.error-message {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: none;
}

/* 11. Footer & Back To Top */
.footer {
    background-color: var(--dark);
    color: var(--white);
    padding: 5rem 0 2rem 0;
    font-size: 0.95rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-logo-text {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--white);
    line-height: 1.2;
}

.footer-logo-text span {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--secondary);
    letter-spacing: 2px;
}

.footer-desc {
    opacity: 0.7;
    margin-bottom: 1.5rem;
}

.footer-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--secondary);
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    opacity: 0.75;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--secondary);
    padding-left: 5px;
}

.footer-contact li {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    opacity: 0.75;
}

.footer-contact-icon {
    color: var(--secondary);
    margin-top: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-bottom-links {
    display: flex;
    gap: 2rem;
}

.footer-bottom-links a {
    opacity: 0.7;
}

.footer-bottom-links a:hover {
    opacity: 1;
    color: var(--secondary);
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 45px;
    height: 45px;
    background-color: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    z-index: 999;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--secondary);
    transform: translateY(-5px);
}
