/* SSSIHL Branding Colors & Variables */
:root {
    --primary-blue: #003366;
    /* Deep Navy */
    --secondary-blue: #0073e6;
    /* Bright Blue */
    --light-blue: #e6f2ff;
    /* Very Light Blue */
    --accent-gold: #f5a623;
    /* Orange/Gold from Swami theme */
    --text-dark: #2c3e50;
    --text-light: #ffffff;
    --text-muted: #6c7a89;
    --bg-white: #ffffff;
    --bg-light: #f8fbff;
    --border-color: #e1e8ed;
}

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

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

h1,
h2,
h3,
h4,
.greeting,
.sign-off {
    font-family: 'Libre Baskerville', serif;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.container-narrow {
    max-width: 800px;
}

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

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

.text-muted {
    color: var(--text-muted);
    font-family: 'Poppins', sans-serif;
}

.text-gold {
    color: var(--accent-gold);
}

.text-blue {
    color: var(--secondary-blue);
}

.bg-light {
    background-color: var(--bg-light);
}

/* --- Header --- */
.main-header {
    background-color: var(--bg-white);
    padding: 0.5rem 1rem;
    border-bottom: 3px solid var(--accent-gold);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    position: relative;
    z-index: 10;
    animation: slideDown 0.8s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    gap: 1rem;
}

.header-logo-container {
    flex: 0 0 100px;
    display: flex;
    justify-content: flex-start;
}

.institute-logo {
    max-width: 60px;
    height: auto;
}

.header-spacer {
    flex: 0 0 100px;
    /* balances the logo width to keep the center text perfectly aligned */
}

.header-text-container {
    flex-grow: 1;
    text-align: center;
}

.header-text h2 {
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    margin-bottom: 0.1rem;
    color: var(--primary-blue);
    font-weight: 700;
}

.header-text p {
    font-size: 0.8rem;
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
}

.divine-blessings {
    margin-top: 0.2rem;
}

.divine-blessings p {
    font-size: 0.75rem;
    font-style: italic;
    color: var(--text-muted);
}

.divine-blessings h3 {
    font-size: 1rem;
    color: var(--accent-gold);
    margin-top: 0.1rem;
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    background-color: var(--primary-blue);
    /* Fallback */
    color: white;
    padding: 7rem 2rem;
    text-align: center;
    overflow: hidden;
}

.hero-bg-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-bg-slideshow .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: slideFade 25s infinite;
}

.slide-1 {
    background-image: url('s/s1.jfif');
    animation-delay: 0s !important;
}

.slide-2 {
    background-image: url('s/s2.jpg');
    animation-delay: 5s !important;
}

.slide-3 {
    background-image: url('s/s3.jfif');
    animation-delay: 10s !important;
}

.slide-4 {
    background-image: url('s/s4.jpg');
    animation-delay: 15s !important;
}

.slide-5 {
    background-image: url('s/s5.jpg');
    animation-delay: 20s !important;
}

@keyframes slideFade {
    0% {
        opacity: 0;
    }

    5% {
        opacity: 1;
    }

    20% {
        opacity: 1;
    }

    25% {
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 20, 40, 0.75);
    /* Darker overlay for better contrast */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1000px;
    margin: 0 auto;
}

.event-title {
    font-size: 5.5rem;
    color: var(--accent-gold);
    margin-bottom: -10px;
    font-weight: 700;
    text-shadow: 2px 4px 15px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 0, 0, 0.6);
}

.event-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8rem;
    letter-spacing: 4px;
    font-weight: 300;
    margin-bottom: 2rem;
}

.theme-tags {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
    font-weight: 600;
    letter-spacing: 2px;
}

.theme-tags .dot {
    color: var(--accent-gold);
}

.event-details-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 3rem;
}

.detail-box {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.1rem;
    font-weight: 500;
}

.detail-box i {
    color: var(--accent-gold);
    font-size: 1.3rem;
}

.primary-btn {
    display: inline-block;
    background: var(--accent-gold);
    color: var(--primary-blue);
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(245, 166, 35, 0.4);
    transition: transform 0.3s, box-shadow 0.3s;
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(245, 166, 35, 0.6);
    color: var(--primary-blue);
}

/* --- Invitation Card --- */
.invitation-section {
    background: url('https://www.transparenttextures.com/patterns/rice-paper.png') var(--bg-white);
}

.section-heading {
    color: var(--primary-blue);
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.letter-card {
    background: white;
    padding: 3.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border-top: 5px solid var(--secondary-blue);
    position: relative;
}

.letter-card::before {
    content: '\f10d';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 20px;
    left: 30px;
    font-size: 3rem;
    color: var(--light-blue);
    opacity: 0.5;
}

.letter-card p {
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
    color: #444;
}

.greeting,
.sign-off {
    font-size: 1.3rem !important;
    color: var(--primary-blue) !important;
}

.sign-off {
    margin-top: 2rem;
    font-style: italic;
}

/* --- Analytics Section --- */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 30px rgba(0, 51, 102, 0.06);
    border: 1px solid var(--border-color);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 51, 102, 0.1);
}

.total-card {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.icon-wrap {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.total-card h3 {
    font-size: 4.5rem;
    line-height: 1;
    margin-bottom: 0.5rem;
    color: var(--accent-gold);
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
}

.total-card p {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--light-blue);
    padding-bottom: 1rem;
}

.card-header h4 {
    font-size: 1.3rem;
    color: var(--primary-blue);
}

.card-header i {
    font-size: 1.4rem;
}

/* Lists */
.ranking-list {
    list-style: none;
}

.ranking-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px dashed var(--border-color);
    font-size: 1.1rem;
}

.ranking-list li:last-child {
    border-bottom: none;
}

.batch-year {
    font-weight: 600;
    color: var(--text-dark);
}

.batch-count {
    background: var(--light-blue);
    color: var(--secondary-blue);
    padding: 0.2rem 0.8rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
}

.recent-profiles {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 12px;
    border-left: 4px solid var(--accent-gold);
}

.profile-icon {
    width: 45px;
    height: 45px;
    background: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--secondary-blue);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.profile-info h5 {
    font-size: 1.05rem;
    color: var(--primary-blue);
    margin-bottom: 0.2rem;
}

.profile-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- Class-wise Grid --- */
.class-wise-container {
    margin-top: 2rem;
}

.class-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
}

.class-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 51, 102, 0.05);
    border: 1px solid var(--border-color);
    border-top: 4px solid var(--secondary-blue);
    transition: transform 0.3s, box-shadow 0.3s;
}

.class-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 51, 102, 0.1);
}

.class-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.class-count {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    color: var(--accent-gold);
    margin-bottom: 0.2rem;
}

.class-label-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Footer / Contact --- */
.contact-section {
    background: var(--primary-blue);
    color: white;
    padding: 4rem 0 0 0;
}

.footer-grid-single {
    display: flex;
    justify-content: center;
    text-align: center;
    padding-bottom: 3rem;
}

.contact-info h3,
.social-links h3 {
    color: var(--accent-gold);
    margin-bottom: 1.5rem;
}

.contact-info p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.phone-link {
    font-size: 1.3rem !important;
    font-weight: 600;
    color: white !important;
    margin-top: 1rem;
}

.phone-link i {
    color: var(--accent-gold);
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.2rem;
}

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

.footer-bottom {
    background: #002244;
    text-align: center;
    padding: 1.5rem;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* --- Animations --- */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

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

.pulse-animation {
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 166, 35, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(245, 166, 35, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(245, 166, 35, 0);
    }
}

/* Responsiveness */
@media (max-width: 1000px) {
    .header-container {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding-top: 0.5rem;
    }

    .header-logo-container,
    .header-spacer {
        flex: auto;
        justify-content: center;
    }

    .header-spacer {
        display: none;
    }

    .header-text h2 {
        font-size: 1.2rem;
        line-height: 1.4;
        margin-top: 0.5rem;
    }

    .institute-logo {
        max-width: 70px;
    }
}

@media (max-width: 900px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .event-details-bar {
        flex-direction: column;
        text-align: center;
        border-radius: 20px;
    }

    .event-title {
        font-size: 4rem;
    }
}

@media (max-width: 600px) {
    .event-title {
        font-size: 3rem;
        text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.9);
    }

    .event-subtitle {
        font-size: 1.2rem;
        letter-spacing: 2px;
    }

    .theme-tags {
        flex-direction: column;
        gap: 0.5rem;
    }

    .theme-tags .dot {
        display: none;
    }

    .letter-card {
        padding: 2rem 1.5rem;
    }

    .hero-section {
        padding: 4rem 1rem;
    }

    .event-details-bar {
        font-size: 0.9rem;
    }
}