/* ==============================
   HILL POINT HIGHER SECONDARY SCHOOL
   Main Stylesheet
   ============================== */

/* ---------- CSS VARIABLES ---------- */
:root {
    --primary: #1a4f8b;
    --primary-dark: #0d3560;
    --primary-light: #2a6cb8;
    --secondary: #e8b930;
    --dark: #1a1a2e;
    --light-bg: #f5f7fa;
    --text: #333;
    --text-muted: #6c757d;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Open Sans', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
}

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

img {
    max-width: 100%;
}

.section-padding {
    padding: 80px 0;
}

/* ---------- SECTION HEADING ---------- */
.section-heading h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--dark);
}

.heading-line {
    width: 60px;
    height: 3px;
    background: var(--primary);
    margin: 10px auto 0;
    border-radius: 2px;
}

.heading-line-left {
    margin: 10px 0 0;
}

/* ---------- TOP BAR ---------- */
.top-bar {
    background: var(--primary-dark);
    color: #fff;
    font-size: 0.85rem;
    padding: 8px 0;
}

.top-bar a {
    color: #fff;
    font-size: 1.1rem;
}

.top-bar a:hover {
    color: var(--secondary);
}

/* ---------- NAVBAR ---------- */
#mainNavbar {
    padding: 8px 0;
    transition: all 0.3s ease;
    z-index: 1050;
}

#mainNavbar.scrolled {
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.navbar-logo {
    height: 60px;
    width: auto;
    filter: contrast(1.8) saturate(1.5);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.school-name {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

.school-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.navbar-nav .nav-link {
    font-weight: 600;
    color: var(--dark);
    padding: 8px 14px !important;
    font-size: 0.9rem;
    position: relative;
    transition: color 0.3s ease;
}

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

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 14px;
    right: 14px;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    transform: scaleX(1);
}

.dropdown-menu {
    border: none;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    border-radius: 8px;
}

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

/* ---------- HERO CAROUSEL ---------- */
#heroCarousel {
    height: 100vh;
    min-height: 600px;
    will-change: transform, opacity;
    transition: none;
}

#home {
    overflow: hidden;
    position: relative;
}

#heroCarousel .carousel-inner,
#heroCarousel .carousel-item {
    height: 100%;
}

#heroCarousel .carousel-item img {
    height: 100%;
    object-fit: cover;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(13,53,96,0.7) 0%, rgba(26,79,139,0.4) 100%);
    z-index: 1;
}

#heroCarousel .carousel-caption {
    z-index: 2;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0 15%;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--secondary);
    margin-bottom: 10px;
    animation: fadeInDown 1s ease;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 15px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
    animation: fadeInUp 1s ease;
}

.hero-desc {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.85);
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 1.2s ease;
}

.hero-btn {
    border-radius: 50px;
    padding: 12px 35px;
    font-weight: 600;
    letter-spacing: 1px;
    animation: fadeInUp 1.4s ease;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 45px;
    height: 45px;
    background-color: rgba(26,79,139,0.6);
    border-radius: 50%;
    padding: 10px;
}

.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 5px;
}

/* ---------- STATS ---------- */
.stats-section {
    background: var(--primary);
    color: #fff;
}

.stat-item h2 {
    font-size: 2.5rem;
    font-weight: 700;
}

.stat-item p {
    margin-bottom: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ---------- ABOUT ---------- */
#about img {
    border-radius: 10px;
}

/* ---------- PRINCIPAL ---------- */
.principal-card {
    background: #fff;
    border-left: 5px solid var(--primary);
}

.principal-placeholder {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border: 4px solid var(--primary);
}

.principal-placeholder i {
    font-size: 5rem;
    color: var(--primary);
}

.principal-message p {
    line-height: 1.8;
}

/* ---------- FACULTIES ---------- */
.faculty-card {
    background: #fff;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.faculty-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 15px 35px rgba(26,79,139,0.15) !important;
}

.faculty-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.faculty-icon i {
    font-size: 1.8rem;
    color: var(--primary);
}

/* ---------- ADMISSION ---------- */
.step-number {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 15px;
}

.admission-cta {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    position: relative;
    overflow: hidden;
}

.admission-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

/* ---------- SCHOLARSHIP ---------- */
.scholarship-badge {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 15px;
}

.scholarship-card {
    background: #fff;
    transition: all 0.3s ease;
}

.scholarship-card:hover {
    transform: translateY(-5px);
}

/* ---------- NOTICE & CALENDAR ---------- */
.notice-item {
    background: #fff;
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary);
}

.notice-item:hover {
    transform: translateX(5px);
}

.notice-date {
    min-width: 55px;
    padding: 5px;
    background: var(--primary);
    border-radius: 8px;
    color: #fff;
}

.notice-date .day {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
}

.notice-date .month {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
}

.calendar-item {
    background: var(--light-bg);
    transition: all 0.3s ease;
}

.calendar-item:hover {
    background: #fff;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
}

/* ---------- DRESS CODE ---------- */
.dress-card {
    background: #fff;
    transition: all 0.3s ease;
}

.dress-card:hover {
    transform: translateY(-5px);
}

/* ---------- GALLERY ---------- */
.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

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

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

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26,79,139,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-overlay span {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

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

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

/* ---------- NEWS ---------- */
.news-card {
    background: #fff;
    transition: all 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-img {
    height: 200px;
    object-fit: cover;
}

/* ---------- CONTACT ---------- */
.contact-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    border-radius: 50%;
    background: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
}

#contactForm .form-control,
#contactForm .form-select {
    border: 1px solid #e0e0e0;
    padding: 12px 15px;
    border-radius: 8px;
}

#contactForm .form-control:focus,
#contactForm .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,79,139,0.1);
}

/* ---------- MAP ---------- */
.map-section iframe {
    display: block;
}

/* ---------- FOOTER ---------- */
.footer-section {
    background: var(--dark);
    color: #fff;
}

.footer-logo {
    height: 45px;
    width: auto;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--secondary);
    padding-left: 5px;
}

.footer-contact {
    list-style: none;
    padding: 0;
}

.footer-contact li {
    color: rgba(255,255,255,0.5);
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.footer-contact i {
    color: var(--secondary);
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: #fff;
    margin-right: 8px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* ---------- BACK TO TOP ---------- */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    box-shadow: 0 3px 15px rgba(26,79,139,0.3);
    border: none;
    font-size: 1.2rem;
}

#backToTop.show {
    display: flex;
}

/* ---------- BTN PRIMARY OVERRIDE ---------- */
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* ---------- ADMISSION MODAL ---------- */
.admission-notice-content hr {
    border-color: var(--primary);
    opacity: 0.2;
}

#admissionModal .modal-content {
    border-radius: 15px;
    overflow: hidden;
}

#admissionModal .modal-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

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

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

/* ---------- RESPONSIVE ---------- */
@media (max-width: 991px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .hero-desc {
        font-size: 0.95rem;
    }

    #heroCarousel .carousel-caption {
        padding: 0 8%;
    }

    .section-padding {
        padding: 60px 0;
    }
}

@media (max-width: 767px) {
    .hero-title {
        font-size: 1.6rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        letter-spacing: 2px;
    }

    #heroCarousel {
        height: 80vh;
        min-height: 450px;
    }

    .stat-item h2 {
        font-size: 1.8rem;
    }

    .section-heading h2 {
        font-size: 1.6rem;
    }

    .navbar-logo {
        height: 40px;
    }

    .school-name {
        font-size: 1.1rem;
    }
}