/* ============================================
   ERODE SAHODAYA - MASTER STYLESHEET
   Common CSS for all pages
   Modern UI/UX | Bootstrap 5 Integration
   ============================================ */

/* ---------- CSS VARIABLES (Root) ---------- */
:root {
    /* Primary Colors */
    --primary: #0a2b44;
    --primary-dark: #041e32;
    --primary-light: #1e4a76;
    --secondary: #e6b422;
    --secondary-dark: #c99e1a;
    --secondary-light: #f5d471;
    --accent: #2c7a5e;
    --accent-light: #3e9a78;
    
    /* Neutrals */
    --white: #ffffff;
    --off-white: #f9fafc;
    --light-bg: #f8fafc;
    --dark-text: #1e293b;
    --gray-text: #475569;
    --gray-light: #94a3b8;
    --border-light: #e2e8f0;
    
    /* Shadows */
    --shadow-sm: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 25px 35px -12px rgba(0, 0, 0, 0.15);
    --shadow-hover: 0 30px 40px -15px rgba(0, 0, 0, 0.2);
    
    /* Transitions */
    --transition-fast: all 0.2s ease;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s ease;
    
    /* Border Radius */
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --radius-xl: 40px;
    --radius-full: 9999px;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
}

/* ---------- GLOBAL RESET & BASE ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--dark-text);
    background-color: var(--white);
    overflow-x: hidden;
    scroll-behavior: smooth;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6,
.logo-text,
.hero-title,
.section-title,
.navbar-brand {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-weight: 700;
    line-height: 1.3;
}

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

a:hover {
    color: var(--secondary);
    text-decoration: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--off-white);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-dark);
}

/* Selection Color */
::selection {
    background-color: var(--secondary);
    color: var(--primary-dark);
}

/* ---------- TYPOGRAPHY ---------- */
.display-1, .display-2, .display-3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

.lead {
    font-size: 1.2rem;
    color: var(--gray-text);
    font-weight: 400;
}

.text-secondary-custom {
    color: var(--secondary) !important;
}

.text-primary-custom {
    color: var(--primary) !important;
}

/* ---------- BUTTONS & COMPONENTS ---------- */
.btn-primary-custom {
    background: var(--secondary);
    color: var(--primary-dark);
    padding: 12px 32px;
    border-radius: var(--radius-full);
    font-weight: 600;
    border: none;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(230, 180, 52, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary-custom:hover {
    background: var(--secondary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(230, 180, 52, 0.4);
    color: var(--primary-dark);
}

.btn-primary-custom:active {
    transform: translateY(0);
}

.btn-outline-custom {
    border: 2px solid var(--secondary);
    background: transparent;
    color: var(--primary);
    border-radius: var(--radius-full);
    padding: 10px 28px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-outline-custom:hover {
    background: var(--secondary);
    color: var(--primary-dark);
    transform: translateY(-2px);
    border-color: var(--secondary);
}

.btn-secondary-custom {
    background: var(--primary);
    color: var(--white);
    padding: 12px 28px;
    border-radius: var(--radius-full);
    font-weight: 600;
    transition: var(--transition);
    border: none;
}

.btn-secondary-custom:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    color: var(--white);
}

/* ---------- NAVIGATION BAR ---------- */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    padding: 14px 0;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 10px 0;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
}

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

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

.nav-link {
    font-weight: 500;
    color: var(--dark-text) !important;
    margin: 0 8px;
    position: relative;
    transition: var(--transition-fast);
    padding: 8px 0;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2.5px;
    background: var(--secondary);
    transition: width 0.3s ease;
    border-radius: 2px;
}

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

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-md);
    padding: 12px 0;
    margin-top: 12px;
    animation: fadeInDown 0.2s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    font-weight: 500;
    padding: 8px 24px;
    transition: var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--light-bg);
    color: var(--primary);
    padding-left: 28px;
}

/* ---------- SECTION STYLES ---------- */
.section-padding {
    padding: 80px 0;
}

.section-padding-sm {
    padding: 50px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
    color: var(--dark-text);
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 70px;
    height: 4px;
    background: var(--secondary);
    border-radius: 4px;
}

.section-title.text-center:after {
    left: 50%;
    transform: translateX(-50%);
}

.section-subtitle {
    color: var(--gray-text);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ---------- CARDS ---------- */
.card-hover {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.03);
    height: 100%;
}

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

.feature-card {
    background: var(--white);
    padding: 2rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.03);
    height: 100%;
}

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

.feature-icon {
    width: 80px;
    height: 80px;
    background: rgba(230, 180, 52, 0.12);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.2rem;
    color: var(--secondary);
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    background: var(--secondary);
    color: var(--primary-dark);
}

/* Event & News Cards */
.event-card,
.news-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    border: none;
}

.event-card:hover,
.news-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.event-date-badge {
    background: var(--secondary);
    color: var(--primary-dark);
    font-weight: 700;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    display: inline-block;
    font-size: 0.85rem;
}

.news-badge {
    background: var(--primary-light);
    color: white;
    padding: 5px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

/* Member Cards (Trustees & Members List) */
.member-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.8rem 1.5rem;
    text-align: center;
    transition: var(--transition);
    height: 100%;
}

.member-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.member-avatar,
.trustee-img {
    width: 130px;
    height: 130px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 1.2rem;
    border: 4px solid var(--secondary);
    transition: var(--transition);
}

.member-card:hover .member-avatar,
.member-card:hover .trustee-img {
    transform: scale(1.02);
    border-color: var(--secondary-dark);
}

/* Gallery Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.8rem;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1 / 0.9;
}

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

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

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
    padding: 20px;
    color: white;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

/* ---------- HERO SLIDER (Swiper) ---------- */
.hero-slider {
    position: relative;
    width: 100%;
    margin-top: 78px;
    overflow: hidden;
}

.swiper {
    width: 100%;
    height: 88vh;
    min-height: 580px;
}

.swiper-slide {
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
}

.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.35) 100%);
}

.slide-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 750px;
    padding: 2rem;
    animation: fadeInUp 0.9s ease-out;
}

.slide-content h1 {
    font-size: 3.6rem;
    font-weight: 800;
    text-shadow: 2px 2px 15px rgba(0, 0, 0, 0.3);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.slide-content p {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 1.8rem;
}

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

.swiper-button-next,
.swiper-button-prev {
    color: var(--secondary);
    background: rgba(0, 0, 0, 0.4);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    transition: var(--transition-fast);
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: var(--secondary);
    color: var(--primary);
}

.swiper-pagination-bullet {
    background: white;
    opacity: 0.6;
}

.swiper-pagination-bullet-active {
    background: var(--secondary);
    opacity: 1;
}

/* ---------- STATS SECTION ---------- */
.stats-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 70px 0;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    font-family: 'Playfair Display', serif;
    margin-bottom: 0.5rem;
}

/* ---------- PAGE HEADER (Inner Pages) ---------- */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    padding: 100px 0 60px;
    margin-top: 76px;
    color: white;
    text-align: center;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.breadcrumb-custom {
    background: transparent;
    padding: 0;
    margin-top: 1rem;
    justify-content: center;
}

.breadcrumb-custom .breadcrumb-item a {
    color: var(--secondary);
}

.breadcrumb-custom .breadcrumb-item.active {
    color: white;
}

/* ---------- TABLE STYLES (Results) ---------- */
.table-custom {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table-custom thead {
    background: var(--primary);
    color: white;
}

.table-custom th,
.table-custom td {
    padding: 1rem;
    vertical-align: middle;
}

.table-custom tbody tr:hover {
    background: var(--light-bg);
}

/* ---------- FOOTER ---------- */
footer {
    background: #0a1927;
    color: #cbd5e1;
    padding-top: 60px;
}

footer h5 {
    color: white;
    margin-bottom: 1.2rem;
    font-weight: 600;
}

footer a {
    color: var(--secondary);
    text-decoration: none;
    transition: var(--transition-fast);
}

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

footer .list-unstyled li {
    margin-bottom: 0.6rem;
}

/* ---------- UTILITY CLASSES ---------- */
.bg-light-custom {
    background-color: var(--light-bg);
}

.bg-primary-gradient {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.shadow-hover {
    transition: var(--transition);
}

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

.radius-md {
    border-radius: var(--radius-md);
}

.radius-lg {
    border-radius: var(--radius-lg);
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.fade-in {
    animation: fadeIn 0.8s ease;
}

.slide-left {
    animation: slideInLeft 0.6s ease;
}

.slide-right {
    animation: slideInRight 0.6s ease;
}

/* ---------- RESPONSIVE MEDIA QUERIES ---------- */
@media (max-width: 1200px) {
    .section-padding {
        padding: 70px 0;
    }
    
    .slide-content h1 {
        font-size: 3rem;
    }
}

@media (max-width: 992px) {
    .section-title {
        font-size: 2.2rem;
    }
    
    .slide-content h1 {
        font-size: 2.5rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .page-header h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .section-padding {
        padding: 50px 0;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .hero-slider {
        margin-top: 68px;
    }
    
    .swiper {
        height: 70vh;
        min-height: 480px;
    }
    
    .slide-content h1 {
        font-size: 2rem;
    }
    
    .slide-content p {
        font-size: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.4rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .page-header {
        padding: 80px 0 50px;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 1.2rem;
    }
    
    .member-avatar,
    .trustee-img {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 1.6rem;
    }
    
    .btn-primary-custom,
    .btn-outline-custom {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
    
    .slide-content {
        padding: 1.5rem;
    }
    
    .slide-content h1 {
        font-size: 1.6rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .feature-icon {
        width: 65px;
        height: 65px;
        font-size: 1.8rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- PRINT STYLES ---------- */
@media print {
    .navbar,
    .hero-slider,
    footer,
    .btn-primary-custom,
    .btn-outline-custom {
        display: none;
    }
    
    body {
        color: black;
        background: white;
    }
    
    .page-header {
        background: none;
        color: black;
        padding: 20px 0;
        margin-top: 0;
    }
    
    .section-padding {
        padding: 20px 0;
    }
}