/* File: public/css/style.css */

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

:root {
    --primary: #2E7D32;
    --primary-light: #4CAF50;
    --primary-dark: #1B5E20;
    --secondary: #FF9800;
    --secondary-light: #FFB74D;
    --light: #F1F8E9;
    --light-gray: #f8f9fa;
    --dark: #333;
    --accent: #C8E6C9;
    --gradient: linear-gradient(135deg, var(--primary), var(--primary-dark));
    --shadow: 0 8px 30px rgba(0,0,0,0.08);
    --shadow-hover: 0 15px 40px rgba(0,0,0,0.15);
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

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

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(241, 248, 233, 0.2) 0%, rgba(255, 255, 255, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

/* ====================== */
/* 2. TYPOGRAPHY & UTILITIES */
/* ====================== */
.section-title {
    position: relative;
    margin-bottom: 70px;
    font-weight: 800;
    color: var(--primary-dark);
    text-align: center;
    font-size: 2.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 5px;
    background: var(--secondary);
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 10px;
}

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

.fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

/* ====================== */
/* 3. NAVIGATION */
/* ====================== */
.navbar {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    padding: 18px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.navbar-brand {
    font-weight: 800;
    color: var(--primary);
    font-size: 1.9rem;
    letter-spacing: -0.5px;
    transition: var(--transition);
}

.navbar-brand span {
    color: var(--secondary);
    position: relative;
}

.navbar-brand span::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    bottom: -2px;
    left: 0;
    background: var(--secondary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
}

.navbar-brand:hover span::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-link {
    font-weight: 500;
    margin: 0 12px;
    position: relative;
    color: #555;
    transition: var(--transition);
    padding: 8px 0; 
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 0;
    background: var(--secondary);
    border-radius: 10px;
    transition: var(--transition);
}

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

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

.dropdown-item {
    padding: 10px 20px;
    border-radius: 5px;
    margin: 5px 10px;
    width: calc(100% - 20px);
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--light);
    color: var(--primary);
    transform: translateX(5px);
}

/* ====================== */
/* 4. HEADERS & HERO */
/* ====================== */
.page-header {
    background: linear-gradient(135deg, rgba(46,125,50,0.9), rgba(27,94,32,0.9)), 
                url('https://images.unsplash.com/photo-1514432324607-a09d9b4aefdd?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1471&q=80');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 100px 0;
    text-align: center;
    margin-bottom: 50px;
}

.page-header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.page-header p {
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
}

.hero-section {
    height: 100vh;
    min-height: 800px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(46,125,50,0.1) 0%, rgba(255,255,255,0) 70%);
}

.hero-content {
    z-index: 2;
    position: relative;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 25px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.4rem;
    margin-bottom: 40px;
    color: #555;
    max-width: 600px;
}

.hero-image {
    position: relative;
    z-index: 1;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transform: perspective(1000px) rotateY(-10deg);
    transition: var(--transition);
    height: 500px;
    object-fit: cover;
}

.hero-image:hover {
    transform: perspective(1000px) rotateY(0deg);
    box-shadow: var(--shadow-hover);
}

/* ====================== */
/* 5. CARDS */
/* ====================== */
/* Category Cards */
.category-card {
    border-radius: 18px;
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    border: none;
    box-shadow: var(--shadow);
    position: relative;
    background: #fff;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: var(--gradient);
    z-index: 1;
    opacity: 0;
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-hover);
}

.category-card:hover::before {
    height: 5px;
    opacity: 1;
}

.category-card .card-img-top {
    height: 220px;
    object-fit: cover;
    transition: var(--transition);
}

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

.category-card .card-body {
    padding: 25px;
    position: relative;
    z-index: 2;
    background: #fff;
}

.category-card .card-title {
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

/* Testimonial Cards */
.testimonial-card {
    background: #fff;
    border-radius: 20px;
    padding: 35px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    margin: 20px;
    height: 100%;
    position: relative;
    border: 1px solid rgba(0,0,0,0.05);
}

.testimonial-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.testimonial-card::before {
    content: "\201C";
    position: absolute;
    top: 30px;
    left: 30px;
    font-size: 80px;
    color: var(--primary-light);
    opacity: 0.2;
    font-family: Georgia, serif;
    line-height: 1;
}

.testimonial-rating {
    color: #FFC107;
    margin-bottom: 20px;
}

.testimonial-text {
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 25px;
    color: #555;
}

.testimonial-author {
    display: flex;
    align-items: center;
}

.author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.5rem;
    margin-right: 15px;
}

/* Vision Mission Cards */
.vm-card {
    background: var(--gradient);
    color: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.vm-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.vm-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 70%);
    transform: rotate(30deg);
    pointer-events: none;
}

.vm-icon {
    font-size: 3rem;
    margin-bottom: 25px;
    color: var(--secondary);
    transition: var(--transition);
}

.vm-card:hover .vm-icon {
    transform: scale(1.1);
}

/* Package Cards */
.package-card {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    position: relative;
}

.package-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.package-img {
    height: 180px;
    object-fit: cover;
    transition: var(--transition);
}

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

.package-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(46, 125, 50, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.package-card:hover .package-overlay {
    opacity: 1;
}

/* Branch Cards */
.branch-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    border-left: 4px solid transparent;
    position: relative;
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.branch-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-left: 4px solid var(--secondary);
}

.branch-card.active {
    background: var(--light);
    border-left: 4px solid var(--primary);
}

.branch-card h3 {
    color: var(--primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.branch-card h3 i {
    margin-right: 10px;
    color: var(--secondary);
}

.branch-card p {
    color: #555;
    margin-bottom: 5px;
    padding-left: 28px;
}

.branch-card .distance {
    background: var(--accent);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    position: absolute;
    top: 20px;
    right: 20px;
    font-weight: 500;
}

/* Animation delays for branch cards */
.branch-card:nth-child(1) { animation-delay: 0.1s; }
.branch-card:nth-child(2) { animation-delay: 0.2s; }
.branch-card:nth-child(3) { animation-delay: 0.3s; }
.branch-card:nth-child(4) { animation-delay: 0.4s; }
.branch-card:nth-child(5) { animation-delay: 0.5s; }
.branch-card:nth-child(6) { animation-delay: 0.6s; }
.branch-card:nth-child(7) { animation-delay: 0.7s; }

/* ====================== */
/* 6. SECTIONS & LAYOUT */
/* ====================== */
.section {
    padding: 40px 0;
}

.testimonial-section {
    background: linear-gradient(to right, var(--light), #fff);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

/* Branch Content */
.branch-content {
    max-width: 1200px;
    margin: 0 auto 50px;
    padding: 0 20px;
}

.branch-content .section-title {
    position: relative;
    margin-bottom: 40px;
    font-weight: 700;
    color: var(--primary-dark);
    text-align: center;
    font-size: 2.2rem;
}

.branch-content .section-title::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background: var(--secondary);
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 10px;
}

.content-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 50px;
}

.map-container {
    flex: 2;
    min-width: 400px;
    height: 500px;
    overflow: visible;
    z-index: 1;
    opacity: 1;
    visibility: visible;
}

.branches-list {
    flex: 1;
    min-width: 300px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 15px;
}

/* Info Section */
.info-section {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: var(--shadow);
    margin-top: 30px;
}

.info-section h2 {
    color: var(--primary);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--accent);
}

.info-content {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.info-text {
    flex: 1;
    min-width: 300px;
}

.info-text p {
    margin-bottom: 15px;
    color: #555;
    line-height: 1.8;
}

.contact-info {
    flex: 1;
    min-width: 300px;
    background: var(--light);
    border-radius: 12px;
    padding: 25px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.contact-item i {
    color: var(--secondary);
    font-size: 1.5rem;
    min-width: 40px;
    margin-top: 5px;
}

.contact-text h4 {
    color: var(--primary);
    margin-bottom: 5px;
    font-weight: 600;
}

.contact-text p {
    color: #555;
}

/* ====================== */
/* 7. FORMS */
/* ====================== */
.contact-form {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.contact-form:hover {
    box-shadow: var(--shadow-hover);
}

.form-control {
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(46, 125, 50, 0.25);
}

/* ====================== */
/* 8. BUTTONS */
/* ====================== */
.btn-primary {
    background: var(--gradient);
    border: none;
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 12px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.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: 0.5s;
}

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

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(46, 125, 50, 0.2);
}

.btn-secondary {
    background: var(--secondary);
    border: none;
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 12px;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--secondary-light);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 152, 0, 0.2);
}

/* ====================== */
/* 9. FOOTER */
/* ====================== */
.footer {
    background: linear-gradient(135deg, var(--dark), var(--primary));
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-section {
    flex: 1;
    min-width: 250px;
}

.footer h4 {
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 20px;
    font-weight: 600;
}

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

.footer p {
    opacity: 0.8;
    margin-bottom: 15px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    margin-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-bottom p {
    margin-bottom: 0;
    opacity: 0.7;
}

/* ====================== */
/* 10. SOCIAL ICONS */
/* ====================== */
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    margin-right: 10px;
    transition: var(--transition);
}

.social-icon:hover {
    background: var(--secondary);
    transform: translateY(-5px);
}

/* ====================== */
/* 11. LEAFLET MAP */
/* ====================== */
#map {
    z-index: 0;
    opacity: 1;
    visibility: visible;
    position: relative;
    height: 100%;
    width: 100%;
}

/* Essential for Leaflet */
.leaflet-container {
    background: #fff;
    z-index: 0;
    position: relative;
}

/* ====================== */
/* 12. RESPONSIVE STYLES */
/* ====================== */
@media (max-width: 992px) {
    .page-header h1 {
        font-size: 2.8rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    .hero-title {
        font-size: 3rem;
    }

    .content-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .map-container,
    .branches-list {
        width: 100%;
        max-width: 700px;
    }

    .map-container {
        height: 50vh;
        order: 1;
    }

    .branches-list {
        max-height: 400px;
        order: 2;
        padding-right: 0;
    }

    .info-content {
        flex-direction: column;
        align-items: center;
    }
    .info-text,
    .contact-info {
        width: 100%;
        max-width: 700px;
        min-width: unset;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 70px 20px;
    }
    
    .page-header h1 {
        font-size: 2.3rem;
    }
    
    .page-header p {
        font-size: 1.1rem;
    }
    
    .content-wrapper {
        flex-direction: column;
        gap: 20px;
    }
    
    .branches-list {
        max-height: none;
        order: 2;
        padding-right: 0;
    }
    
    .map-container {
        height: 40vh;
        min-height: 250px;
        order: 1;
        width: 100%;
        max-width: none;
    }
    
    .branch-card {
        padding: 15px;
    }
    
    .branch-card .distance {
        position: static;
        display: block;
        margin-top: 10px;
        margin-left: 0;
        text-align: right;
        width: auto;
    }

    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }

    .info-section {
        padding: 25px;
    }
    .info-section h2 {
        font-size: 1.8rem;
    }
    .contact-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .contact-item i {
        margin-bottom: 5px;
        margin-right: 0;
    }
}