/* ===== CSS VARIABLES ===== */
:root {
    --ieee-blue: #0066cc;
    --ieee-dark-blue: #003d7a;
    --ieee-light-blue: #4d9fff;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --dark-gray: #6c757d;
    --text-dark: #212529;
    --border-light: #dee2e6;
    --shadow-light: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-medium: 0 5px 20px rgba(0,0,0,0.15);
    --shadow-heavy: 0 10px 30px rgba(0,0,0,0.2);
    --gradient-primary: linear-gradient(135deg, var(--ieee-blue), var(--ieee-dark-blue));
    --gradient-light: linear-gradient(135deg, var(--ieee-light-blue), var(--ieee-blue));
}

/* ===== GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}
/* ===== PAGE LOADER ===== */
/* ===== PAGE LOADER (NEW DESIGN) ===== */
.page-loader {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: var(--gradient-primary, linear-gradient(135deg, #0066cc, #003d7a));
    z-index: 9999;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-shell {
    text-align: center;
    color: #ffffff;
    padding: 2rem 2.75rem;
    border-radius: 28px;
    background: radial-gradient(circle at top, rgba(255,255,255,0.18), rgba(0,0,0,0.45));
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
    max-width: 320px;
    width: 100%;
}

/* Logo + orbits */
.loader-logo-ring {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 1rem auto;
}

.loader-logo-ring .loader-logo {
    position: absolute;
    inset: 50%;
    transform: translate(-50%, -50%);
    max-width: 90px;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

.loader-orbit {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #ffffff;
    animation: loader-orbit-spin 1.1s linear infinite;
}

.loader-orbit-delay {
    inset: 8px;
    border-top-color: var(--ieee-light-blue, #4d9fff);
    animation-duration: 1.6s;
}

/* Text */
.loader-title {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
}

.loader-subtitle {
    font-size: 0.82rem;
    opacity: 0.85;
    margin-bottom: 1.3rem;
}

.loader-bar {
    position: absolute;
    inset: 0;
    width: 40%;
    border-radius: 999px;
    background: linear-gradient(90deg, #ffffff, var(--ieee-light-blue, #4d9fff));
    animation: loader-bar-slide 1.3s ease-in-out infinite;
}

/* Hint text */
.loader-hint {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.7;
}

/* Animations */
@keyframes loader-orbit-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .loader-orbit,
    .loader-orbit-delay,
    .loader-bar {
        animation-duration: 2s;
    }
}

/* ===== UTILITY CLASSES ===== */
.section-padding {
    padding: 80px 0;
}

@media (max-width: 768px) {
    .section-padding {
        padding: 60px 0;
    }
}

/* ===== NAVIGATION ===== */
.navbar {
    background: var(--gradient-primary);
    padding: 15px 0;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: var(--gradient-primary);
    background: rgba(0, 102, 204, 0.95);
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--white) !important;
}

.brand-text {
    display: inline-block;
}

@media (max-width: 576px) {
    .brand-text {
        font-size: 0.9rem;
    }
}

.navbar-nav .nav-link {
    color: var(--white) !important;
    font-weight: 500;
    margin: 0 10px;
    position: relative;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--ieee-light-blue) !important;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background: var(--ieee-light-blue);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

.ieee-main-logo {
    max-width: 180px;
    height: auto;
}

/* ===== HERO SECTION ===== */
.hero-section {
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-swiper {
    width: 100%;
    height: 100%;
}

.hero-slide {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.hero-content {
    text-align: center;
    color: var(--white);
    z-index: 2;
    position: relative;
    max-width: 800px;
    padding: 0 20px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.4rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
}

/* ===== SECTION TITLES ===== */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-dark);
    position: relative;
}

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

.section-title.text-start::after {
    left: 0;
    transform: none;
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
}

/* ===== ABOUT SECTION ===== */
.ieee-logo-container {
    padding: 2rem;
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease;
}

.ieee-logo-container:hover {
    transform: translateY(-10px);
}

.ieee-main-logo {
    max-width: 180px;
    height: auto;
}

/* ===== STATISTICS SECTION ===== */
.stat-card {
    padding: 2rem;
    text-align: center;
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
}

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

.stat-icon {
    color: var(--ieee-blue);
    margin-bottom: 1rem;
}

.stat-icon i {
    font-size: 2.5rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--ieee-blue);
    display: block;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    color: var(--dark-gray);
    font-weight: 500;
}

/* ===== EVENTS SECTION ===== */
.events-swiper {
    padding-bottom: 50px;
}

.event-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    height: 100%;
}

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

.event-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.event-overlay {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2;
}

.event-date {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.event-content {
    height: 250px;
    padding: 1.5rem;
}

.event-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.event-content p {
    color: var(--dark-gray);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* ===== Awards ===== */
.awards-section { background: var(--light-gray); }
.award-card{
  background: var(--white);
  border:1px solid var(--border-light);
  border-radius:16px;
  box-shadow:var(--shadow-light);
  overflow:hidden;
  transition:transform .25s, box-shadow .25s;
}
.award-card:hover{ transform:translateY(-6px); box-shadow:var(--shadow-medium); }
.award-media{ position:relative; overflow:hidden; }
.award-media img{ width:100%; height:auto; cursor:zoom-in; display:block; }
.award-badge{
  position:absolute; top:12px; left:12px;
  background:var(--gradient-primary); color:var(--white);
  padding:6px 12px; border-radius:999px; font-weight:700; font-size:.9rem;
  box-shadow:var(--shadow-light);
}
.award-body{ padding:1.25rem 1.25rem 1.5rem; }
.award-title{ margin:0 0 .25rem; font-weight:700; }
.award-meta{ color:var(--dark-gray); margin-bottom:.75rem; }
.award-text{ margin-bottom:1rem; }
.award-modal .modal-content{ border-radius:16px; overflow:hidden; }


/* ===== GALLERY SECTION ===== */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

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

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

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 102, 204, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.gallery-overlay i {
    color: var(--white);
    font-size: 2rem;
}
/* ===== CHAPTER CARDS ===== */
.chapter-card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-light);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    border: 1px solid var(--border-light);
}

.chapter-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-medium);
    border-color: var(--ieee-light-blue);
}

.chapter-image {
    overflow: hidden;
}

.chapter-image img {
    width: 100%;
    height: 190px;
    object-fit: contain; /* or 'cover' if you prefer */
    padding: 1.25rem;
    transition: transform 0.3s ease;
    background-color: #fdfdfd;
}

.chapter-card:hover .chapter-image img {
    transform: scale(1.03);
}

.chapter-body {
    padding: 0 1.5rem 1.75rem;
    color: var(--text-dark);
}

.chapter-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.chapter-text {
    font-size: 0.95rem;
    color: var(--dark-gray);
    margin-bottom: 1.1rem;
}

.chapter-card .btn.btn-sm {
    pointer-events: none; /* whole card is clickable */
}

/* External link icon style */
.external-icon {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Mobile tweaks */
@media (max-width: 576px) {
    .chapter-image img {
        height: 150px;
        padding: 1rem;
    }

    .chapter-title {
        font-size: 1.05rem;
    }
}

/* ===== TIMELINE SECTION ===== */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--ieee-light-blue);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 2rem;
}

.timeline-marker {
    position: absolute;
    left: -25px;
    top: 20px;
    width: 15px;
    height: 15px;
    background: var(--ieee-blue);
    border-radius: 50%;
    border: 3px solid var(--white);
    box-shadow: 0 0 0 3px var(--ieee-blue);
}

.timeline-content .card {
    border: none;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.timeline-content .card:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-medium);
}

.timeline-content .card-body {
    padding: 1.5rem;
}

/* ===== CONTACT SECTION ===== */
.contact-item {
    padding: 2rem;
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    height: 100%;
}

.contact-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-medium);
}

.contact-item h5 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.contact-item p {
    color: var(--dark-gray);
    margin-bottom: 0;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background: var(--white);
    color: var(--ieee-blue);
    transform: translateY(-3px);
}

.footer hr {
    border-color: rgba(255, 255, 255, 0.2);
}

/* ===== BUTTONS ===== */
.btn-primary {
    background: var(--gradient-primary);
    border: none;
    padding: 12px 30px;
    font-weight: 500;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--gradient-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-outline-light {
    border: 2px solid var(--white);
    padding: 12px 30px;
    font-weight: 500;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background: var(--white);
    color: var(--ieee-blue);
    transform: translateY(-2px);
}

/* ===== SWIPER CUSTOMIZATIONS ===== */
.swiper-button-next,
.swiper-button-prev {
    color: var(--ieee-blue);
    background: var(--white);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    box-shadow: var(--shadow-light);
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 18px;
    font-weight: bold;
}

.swiper-pagination-bullet {
    background: var(--ieee-blue);
    opacity: 0.5;
}

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

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

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

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

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE DESIGN ===== */

/* Large devices (desktops, 992px and up) */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (max-width: 992px) {
    .section-padding {
        padding: 60px 0;
    }
    
    .navbar-nav {
        text-align: center;
        margin-top: 1rem;
    }
    
    .timeline {
        padding-left: 1rem;
    }
    
    .timeline::before {
        left: 8px;
    }
    
    .timeline-item {
        padding-left: 1.5rem;
    }
    
    .timeline-marker {
        left: -15px;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (max-width: 768px) {
    .hero-section {
        height: 100vh;
    }
    
    .stat-card {
        margin-bottom: 2rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .event-content {
        padding: 1rem;
    }
    
    .gallery-item img {
        height: 200px;
    }
    
    .contact-item {
        margin-bottom: 2rem;
    }
    
    .footer-brand {
        justify-content: center;
        text-align: center;
    }
    
    .social-icons {
        text-align: center;
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 576px) {
    .section-padding {
        padding: 40px 0;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 1rem;
    }
    
    .event-content h3 {
        font-size: 1.1rem;
    }
    
    .gallery-item img {
        height: 180px;
    }
    
    .timeline-content .card-body {
        padding: 1rem;
    }
    
    .contact-item {
        padding: 1.5rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
/*.nav-link:focus,*/
/*.btn:focus,*/
/*.social-icons a:focus {*/
/*    outline: 2px solid var(--ieee-light-blue);*/
/*    outline-offset: 2px;*/
/*}*/

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hero-slide::before {
        background: rgba(0, 0, 0, 0.6);
    }
    
    .gallery-overlay {
        background: rgba(0, 0, 0, 0.9);
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .navbar,
    .hero-section,
    .footer,
    .swiper-button-next,
    .swiper-button-prev,
    .swiper-pagination {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .section-padding {
        padding: 20px 0;
    }
    
    .card {
        border: 1px solid #ccc;
        box-shadow: none;
    }
}