/* ================= GLOBAL RESET ================= */

html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    scroll-behavior: smooth;

    background: linear-gradient(135deg, #ffdd00, #ffaa00, #ffcc33);
     background: #000;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: scroll; /* IMPORTANT: mobile-safe */
}

/* ================= HERO SECTION ================= */

:root {
    --nav-height-desktop: 70px;
    --nav-height-mobile: 60px;
}

.hero-section {
    position: relative;
    min-height: calc(100svh - var(--nav-height-desktop));
    padding: 0 20px;

    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;

    color: #fff;
    overflow: hidden;

    animation: bgSlide 18s infinite ease-in-out;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* ================= HERO TEXT ================= */

.hero-section h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.hero-section p {
    font-size: 1.2rem;
}

/* ================= BACKGROUND SLIDESHOW ================= */

@keyframes bgSlide {
    0%, 100% {
        background-image:
            linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.65)),
            url("https://www.narthanashethra.lk/Images/Narthana.jpg");
    }
    25% {
        background-image:
            linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.65)),
            url("https://www.narthanashethra.lk/Images/Narthana_1.jpg");
    }
    50% {
        background-image:
            linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.65)),
            url("https://www.narthanashethra.lk/Images/Narthana_2.jpg");
    }
    75% {
        background-image:
            linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.65)),
            url("https://www.narthanashethra.lk/Images/Narthana_3.jpg");
    }
}

/* ================= RESPONSIVE ================= */

@media (max-width: 991px) {
    .hero-section h1 {
        font-size: 2.3rem;
    }

    .hero-section p {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        min-height: calc(100svh - var(--nav-height-mobile));
        padding: 15px;
    }

    .hero-section h1 {
        font-size: 1.8rem;
    }

    .hero-section p {
        font-size: 0.95rem;
    }
}

/* ================= COMMON COMPONENTS ================= */

img.img-fluid {
    max-width: 100%;
    height: auto;
}

.card iframe,
.ratio iframe {
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

.card-title {
    font-size: 1.1rem;
}

@media (max-width: 576px) {
    .card-title {
        font-size: 1rem;
    }
}

/* ================= AWARDS ================= */

#awards .card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#awards .card:hover {
    transform: translateY(-6px);
    box-shadow: 0px 10px 20px rgba(0,0,0,0.15);
}

#awards h2 {
    font-weight: 700;
}

/* ================= BACK TO TOP ================= */

#backToTop {
    position: fixed;
    bottom: 25px;
    right: 25px;

    width: 48px;
    height: 48px;

    border: none;
    border-radius: 50%;

    background: linear-gradient(135deg, #d4af37, #b8962e);
    color: #111;
    font-size: 22px;
    font-weight: bold;

    cursor: pointer;
    display: none;
    z-index: 9999;

    box-shadow: 0 10px 25px rgba(0,0,0,0.35);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#backToTop:hover {
    transform: translateY(-4px) scale(1.05);
}
