/* 
 * Atulya Vikas Foundation - Custom CSS
 * Modern Bootstrap 5 Theme with Pista Green Color Scheme
 */

/* ========== Color Variables (AVF Logo Theme) ========== */
:root {
    /* Primary Green from Logo */
    --avf-green: #8BC34A;
    --avf-green-dark: #689F38;
    --avf-green-light: #9CCC65;
    --avf-green-lighter: #DCEDC8;
    
    /* Brown/Dark from Logo */
    --avf-brown: #4E342E;
    --avf-brown-light: #6D4C41;
    
    /* Accent Colors */
    --avf-accent: #7CB342;
    --white: #FFFFFF;
    --light-gray: #F5F5F5;
    --gray: #757575;
    --dark: #212121;
    --text-dark: #424242;
    --shadow: rgba(0, 0, 0, 0.1);
}

/* ========== Base Styles ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--avf-green-dark);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--avf-green);
}

img {
    max-width: 100%;
    height: auto;
}

/* ========== Smooth Scrolling ========== */
html {
    scroll-behavior: smooth;
}

/* ========== Custom Scrollbar ========== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--avf-green);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--avf-green-dark);
}

/* ========== Top Bar ========== */
.top-bar-gradient {
    background: linear-gradient(135deg, #2c2c2c 0%, #3d3d3d 50%, #4a4a4a 100%);
    font-size: 0.85rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.top-bar-link {
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.top-bar-link:hover {
    transform: translateY(-2px);
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.social-icon-top {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    color: white !important;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.social-icon-top:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* ========== Navigation ========== */
.navbar {
    padding: 0.5rem 0;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.25rem;
    font-weight: 700;
}

.logo-img {
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

.navbar-nav .nav-link {
    padding: 0.5rem 0.8rem;
    font-weight: 500;
    color: var(--text-dark) !important;
    position: relative;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.navbar-nav {
    flex-wrap: nowrap;
}

@media (min-width: 992px) {
    .navbar-nav .nav-link {
        padding: 0.5rem 0.9rem;
        font-size: 0.95rem;
    }
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--avf-green-dark) !important;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--avf-green);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 80%;
}

/* Dropdown hover functionality */
.dropdown-hover:hover > .dropdown-menu,
.dropdown-hover .dropdown-menu:hover {
    display: block;
}

/* Hide default Bootstrap dropdown toggle icon */
.dropdown-toggle::after {
    display: none !important;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    border-radius: 12px;
    padding: 0.5rem;
    margin-top: 0.25rem;
    min-width: 220px;
    animation: fadeInDown 0.3s ease;
}

@media (min-width: 992px) {
    .dropdown-hover .dropdown-menu {
        display: none;
        position: absolute;
    }
    
    .dropdown-hover:hover .dropdown-menu {
        display: block;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    padding: 0.65rem 1.2rem;
    transition: all 0.3s ease;
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-dark);
    font-weight: 500;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, var(--avf-green-lighter), rgba(147, 197, 114, 0.2));
    color: var(--avf-green-dark);
    transform: translateX(5px);
}

.dropdown-divider {
    margin: 0.5rem 0.8rem;
    border-color: rgba(147, 197, 114, 0.2);
}

/* ========== Section Spacing Optimization ========== */
.section {
    padding: 3rem 0 !important;
}

.section.bg-white,
.section.bg-light {
    padding: 3rem 0 !important;
}

.section-title {
    margin-bottom: 0.75rem !important;
}

.section-subtitle {
    margin-bottom: 2rem !important;
}

.mb-5 {
    margin-bottom: 2rem !important;
}

.page-header-mini {
    padding: 1.5rem 0 !important;
}

/* ========== Buttons ========== */
.btn {
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}

.btn-pista-green {
    background: linear-gradient(135deg, var(--avf-green-dark), var(--avf-green));
    color: white;
}

.btn-pista-green:hover {
    background: linear-gradient(135deg, var(--avf-green), var(--avf-green-light));
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(147, 197, 114, 0.3);
    color: white;
}

.btn-outline-pista {
    border: 2px solid var(--avf-green);
    color: var(--avf-green-dark);
    background: transparent;
}

.btn-outline-pista:hover {
    background: var(--avf-green);
    color: white;
    border-color: var(--avf-green);
}

.btn-donate-header {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* ========== Hero Slider Section ========== */
.hero-slider-section {
    position: relative;
}

.hero-slide {
    min-height: 70vh;
    display: flex;
    align-items: center;
    position: relative;
    background-size: cover !important;
    background-position: center !important;
}

.min-vh-70 {
    min-height: 70vh;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.carousel-fade .carousel-item {
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.carousel-fade .carousel-item.active {
    opacity: 1;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white !important;
    background-color: transparent !important;
    opacity: 0.7;
}

.carousel-indicators button.active {
    background-color: white !important;
    opacity: 1;
    transform: scale(1.2);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
    background-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

/* ========== Hero Section (Legacy) ========== */
.hero-section {
    background: linear-gradient(135deg, var(--avf-green-light), var(--avf-green));
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="40" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 2rem;
}

/* ========== Sections ========== */
.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, #FF6B35 0%, #FFA447 30%, #FFD93D 60%, rgba(255, 217, 61, 0.3) 100%);
    bottom: -10px;
    left: 0;
    border-radius: 2px;
}

.section-subtitle {
    color: var(--gray);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* ========== Cards ========== */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--shadow);
    transition: box-shadow 0.3s ease;
    overflow: hidden;
    height: 100%;
}

.card:hover {
    box-shadow: 0 10px 30px rgba(147, 197, 114, 0.25);
}

.card-img-top {
    height: 250px;
    object-fit: cover;
}

.card-body {
    padding: 2rem;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--avf-green-dark);
}

.card-text {
    color: var(--gray);
    margin-bottom: 1.5rem;
}

/* ========== Icon Boxes ========== */
.icon-box {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--shadow);
    transition: all 0.3s ease;
    height: 100%;
}

.icon-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(147, 197, 114, 0.2);
}

.icon-box i {
    font-size: 3rem;
    color: var(--avf-green);
    margin-bottom: 1rem;
    display: inline-block;
    transition: all 0.3s ease;
}

.icon-box:hover i {
    transform: scale(1.1);
    color: var(--avf-green-dark);
}

.icon-box h4 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.icon-box p {
    color: var(--gray);
    margin-bottom: 0;
}

/* ========== Stats Section ========== */
.stats-section {
    background: linear-gradient(135deg, var(--avf-green-dark), var(--avf-green));
    color: white;
}

.stat-item {
    text-align: center;
    padding: 2rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    display: block;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ========== Call to Action ========== */
.cta-section {
    background: linear-gradient(135deg, var(--avf-green-light), var(--avf-green-dark));
    color: white;
    padding: 80px 0;
    text-align: center;
}

.cta-section h2 {
    color: white;
    margin-bottom: 1.5rem;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* ========== Forms ========== */
.form-control {
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--avf-green);
    box-shadow: 0 0 0 0.2rem rgba(147, 197, 114, 0.25);
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

textarea.form-control {
    min-height: 150px;
}

/* ========== Footer ========== */
footer {
    background-color: #1a1a1a;
}

.footer-dark-gradient {
    background: linear-gradient(135deg, #2c2c2c 0%, #3d3d3d 50%, #4a4a4a 100%);
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a:hover {
    color: var(--avf-green-light) !important;
    padding-left: 5px;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
}

.bg-darker {
    background-color: #0d0d0d;
}

.text-light-gray {
    color: #b0b0b0;
}

.text-pista-green-light {
    color: var(--avf-green-light);
}

.hover-pista:hover {
    color: var(--avf-green-light) !important;
}

.hover-opacity:hover {
    opacity: 0.8;
}

/* ========== Utilities ========== */
.bg-pista-green {
    background-color: var(--avf-green) !important;
}

.bg-pista-light {
    background-color: var(--avf-green-lighter) !important;
}

.text-pista-green {
    color: var(--avf-green-dark) !important;
}

.bg-avf-green {
    background-color: var(--avf-green) !important;
}

.bg-avf-brown {
    background-color: var(--avf-brown) !important;
}

.text-avf-green {
    color: var(--avf-green) !important;
}

.icon-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.page-header-mini {
    min-height: 80px;
    display: flex;
    align-items: center;
    padding: 1.5rem 0 !important;
}

/* Aligned Card Content for side-by-side sections */
.card-body h4, .card-body h5 {
    min-height: 2.5rem;
    display: flex;
    align-items: center;
}

.card-body p.text-muted:first-of-type {
    min-height: 3rem;
}

.card-body ul.list-unstyled {
    margin-top: 1rem;
}

.card-body ul.list-unstyled li {
    line-height: 1.8;
}

.shadow-custom {
    box-shadow: 0 10px 30px var(--shadow);
}

.rounded-custom {
    border-radius: 15px;
}

/* ========== Scroll to Top Button ========== */
#scrollToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(147, 197, 114, 0.3);
}

#scrollToTop:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(147, 197, 114, 0.5);
}

/* ========== Animations ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* ========== Responsive Design ========== */
@media (max-width: 991px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 767px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}

/* ========== Page Specific Styles ========== */

/* Gallery Page */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
}

.gallery-item img {
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(147, 197, 114, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Team Page */
.team-member {
    text-align: center;
}

.team-member img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 5px solid var(--avf-green-lighter);
}

/* Timeline */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--avf-green);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--shadow);
}

/* ========== Print Styles ========== */
@media print {
    .navbar, .footer, #scrollToTop, .btn {
        display: none !important;
    }
}
