/**
 * Sunrise International Public School - Styles
 * School-specific CSS with CBSE branding
 */

:root {
    /* School Brand Colors - Blue Theme */
    --branch-primary: #1565C0;
    --branch-secondary: #0D47A1;
    --branch-accent: #42A5F5;
    --branch-light: #E3F2FD;

    /* Colors */
    --white: #ffffff;
    --black: #1a1a2e;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #6c757d;
    --gray-600: #495057;
    --gray-700: #343a40;
    --gray-800: #212529;
    --gray-900: #1a1a2e;

    /* Typography */
    --font-primary: 'Outfit', sans-serif;
    --font-secondary: 'Poppins', sans-serif;

    /* Spacing */
    --section-padding: 5rem 0;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 50rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-premium: 0 20px 40px -15px rgba(0, 0, 0, 0.15);

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --glass-blur: blur(12px);

    /* Gradients (School Brand Colors) */
    --grad-primary: linear-gradient(135deg, var(--branch-primary) 0%, var(--branch-secondary) 100%);
    --grad-secondary: linear-gradient(135deg, #1A237E 0%, #3949AB 100%);
    --grad-dark: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --grad-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.1) 100%);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
    --transition-spring: 500ms cubic-bezier(0.68, -0.6, 0.32, 1.6);
}

/* Utility Classes */
.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.text-gradient {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

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

.section-dark {
    background: var(--grad-dark);
    color: var(--white);
}

.section-tag {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: rgba(21, 101, 192, 0.1);
    color: var(--branch-primary);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: var(--radius-full);
}

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

body {
    font-family: var(--font-secondary);
    color: var(--gray-700);
    line-height: 1.7;
    background: var(--white);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

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

a:hover {
    color: var(--branch-secondary);
}

img {
    max-width: 100%;
    height: auto;
}

/* Preloader */
.preloader {
    position: fixed;
    inset: 0;
    background: var(--white);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s, visibility 0.5s;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--branch-light);
    border-top-color: var(--branch-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Top Bar */
.top-bar {
    background: var(--branch-secondary);
    color: var(--white);
    padding: 0.5rem 0;
    font-size: 0.85rem;
}

.top-info {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.top-info li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.top-info a {
    color: var(--white);
}

.top-info a:hover {
    color: var(--branch-accent);
}

.top-link {
    color: rgba(255, 255, 255, 0.8);
    margin-right: 1rem;
}

.top-link:hover {
    color: var(--white);
}

/* Main Header */
.main-header {
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all var(--transition-base);
    border-bottom: 1px solid var(--gray-100);
}

.main-header.scrolled {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 0.25rem 0;
    box-shadow: var(--shadow-lg);
    border-bottom: 1px solid var(--glass-border);
}

.navbar {
    padding: 0.75rem 0;
}

.main-header.scrolled .navbar {
    padding: 0.5rem 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.navbar-brand img {
    height: 55px;
    transition: height var(--transition-base);
}

.main-header.scrolled .navbar-brand img {
    height: 45px;
}

.brand-text {
    line-height: 1.2;
}

.brand-name {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--branch-primary);
    letter-spacing: -0.5px;
}

.brand-tagline {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-link {
    font-weight: 600;
    color: var(--gray-800) !important;
    padding: 0.75rem 1.25rem !important;
    font-size: 0.95rem;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 1.25rem;
    right: 1.25rem;
    height: 2px;
    background: var(--branch-primary);
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

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

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

/* Navbar Actions */
.btn-cta {
    background: var(--grad-primary);
    border: none;
    color: var(--white) !important;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 15px rgba(21, 101, 192, 0.3);
    transition: all var(--transition-base);
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(21, 101, 192, 0.4);
    color: var(--white) !important;
}

/* Mobile Toggle */
.navbar-toggler {
    border: none;
    padding: 0;
    width: 30px;
    height: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.toggler-icon {
    width: 100%;
    height: 2.5px;
    background: var(--branch-primary);
    border-radius: 2px;
    transition: all var(--transition-base);
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-lg);
}

.dropdown-item {
    padding: 0.5rem 1rem;
}

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

/* Buttons */
.btn-primary {
    background: var(--branch-primary);
    border-color: var(--branch-primary);
}

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

.btn-outline-primary {
    border-color: var(--branch-primary);
    color: var(--branch-primary);
}

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

/* Section Styles */
.section {
    padding: var(--section-padding);
}

.section-gray {
    background: var(--gray-100);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-subtitle {
    color: var(--branch-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.875rem;
    display: block;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

/* Hero Components */
.hero-image-wrapper {
    position: relative;
    z-index: 1;
}

.hero-floating-card {
    position: absolute;
    bottom: 30px;
    right: -20px;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-lg);
    z-index: 2;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.animate-bounce {
    animation: bounce 3s infinite ease-in-out;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--branch-secondary), var(--branch-primary));
    color: var(--white);
    padding: 4rem 0 3rem;
    text-align: center;
}

.page-header h1 {
    color: var(--white);
    margin-bottom: 0.5rem;
}

.page-header .breadcrumb {
    justify-content: center;
    margin: 0;
}

.page-header .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8);
}

.page-header .breadcrumb-item.active {
    color: var(--white);
}

/* Cards */
.card {
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    transition: all var(--transition-base);
}

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

/* Footer */
.branch-footer {
    background: var(--gray-900);
    color: var(--gray-400);
}

.footer-top {
    padding: 4rem 0;
}

.footer-logo {
    height: 60px;
    margin-bottom: 1.5rem;
}

.footer-widget h5 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-widget h5::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background: var(--branch-primary);
}

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

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--gray-400);
}

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

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

.footer-contact li {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.footer-contact i {
    color: var(--branch-primary);
    width: 16px;
    margin-top: 0.25rem;
}

.footer-contact a {
    color: var(--gray-400);
}

.footer-contact a:hover {
    color: var(--branch-accent);
}

.social-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: all var(--transition-base);
}

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

.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.25rem 0;
    font-size: 0.9rem;
}

.footer-bottom a {
    color: var(--branch-accent);
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4);
    }

    50% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 100px;
    right: 25px;
    width: 45px;
    height: 45px;
    background: var(--branch-primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--branch-secondary);
    transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 991px) {
    .top-bar .text-end {
        display: none !important;
    }

    .navbar-collapse {
        background: var(--white);
        padding: 1rem;
        margin-top: 1rem;
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-lg);
    }

    .nav-link {
        padding: 0.75rem 0 !important;
        border-bottom: 1px solid var(--gray-200);
    }

    .btn-nav {
        display: block;
        text-align: center;
        margin: 1rem 0 0;
    }
}

@media (max-width: 767px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .section {
        padding: 3rem 0;
    }

    .page-header {
        padding: 3rem 0 2rem;
    }

    .page-header h1 {
        font-size: 1.75rem;
    }
}