/* 
   Website Frontend CSS 
   School Management System CMS
*/

body {
    font-family: 'Outfit', sans-serif;
    color: #334155;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: #0f172a;
    line-height: 1.2;
}

/* Primary Button Overrides */
.btn-primary {
    background-color: var(--primary-color, #1e40af);
    border-color: var(--primary-color, #1e40af);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-hover, #1e3a8a);
    border-color: var(--primary-hover, #1e3a8a);
}

.btn-outline-primary {
    color: var(--primary-color, #1e40af);
    border-color: var(--primary-color, #1e40af);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color, #1e40af);
    border-color: var(--primary-color, #1e40af);
    color: white;
}

.btn-shadow {
    box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.btn-shadow:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.2);
}

.shadow-primary {
    box-shadow: 0 8px 25px -8px var(--primary-color, #1e40af) !important;
}

/* Top Bar */
.top-bar {
    background-color: #0f172a;
    color: #e2e8f0;
    padding: 8px 0;
    font-size: 0.85rem;
}

.top-bar a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.2s;
}

.top-bar a:hover {
    color: white;
}

.top-login-btn {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
}

.top-login-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Navbar */
.navbar-nav .nav-link {
    color: #475569;
    padding: 0.5rem 1.2rem !important;
    position: relative;
    transition: color 0.3s ease;
}

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

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 1.2rem;
    width: 0;
    height: 2px;
    background-color: var(--primary-color, #1e40af);
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: calc(100% - 2.4rem);
}

/* Hero Carousel */
.hero-section {
    position: relative;
    min-height: 85vh;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    letter-spacing: -1px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.carousel-fade .carousel-item {
    transition-duration: 1.5s;
}

/* Feature Cards */
.feature-card {
    background: white;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15) !important;
    border-color: rgba(0, 0, 0, 0.1);
}

.bg-primary-soft {
    background-color: rgba(30, 64, 175, 0.1);
}

.bg-secondary-soft {
    background-color: rgba(245, 158, 11, 0.1);
}

/* Utilities */
.tracking-wide {
    letter-spacing: 0.05em;
}

.overlay-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.4) 100%);
    z-index: 1;
}

.social-icon-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    transition: all 0.2s;
}

.social-icon-btn:hover {
    background: var(--primary-color, #1e40af);
    color: white;
    transform: translateY(-2px);
}

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

.footer-links a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: all 0.2s;
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

/* CMS Page Content Styling */
.cms-content h1,
.cms-content h2,
.cms-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-family: 'Playfair Display', serif;
}

.cms-content p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: #475569;
}

.cms-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.cms-content ul,
.cms-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.cms-content li {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #475569;
}

/* ===== Floating Action Buttons (FAB) ===== */
.fab-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
}

.fab-main {
    width: 60px;
    height: 60px;
    background: var(--primary-color, #1e40af);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    box-shadow: 0 10px 25px -5px rgba(30, 64, 175, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 1.5rem;
    border: none;
}

.fab-main:hover {
    transform: scale(1.1) rotate(45deg);
    background: var(--secondary-color, #f59e0b);
    box-shadow: 0 15px 30px -5px rgba(245, 158, 11, 0.4);
}

.fab-sub-actions {
    position: absolute;
    bottom: 70px;
    right: 5px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.fab-container:hover .fab-sub-actions {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.fab-action {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
    font-size: 1.2rem;
    position: relative;
}

.fab-action:hover {
    transform: scale(1.15) translateX(-5px);
    color: white;
}

.fab-action::before {
    content: attr(data-label);
    position: absolute;
    right: 60px;
    background: #0f172a;
    color: white;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}

.fab-action:hover::before {
    opacity: 1;
    visibility: visible;
    right: 65px;
}

.bg-whatsapp {
    background: #25d366;
}

.bg-call {
    background: #10b981;
}

.bg-email {
    background: #3b82f6;
}

.bg-map {
    background: #ef4444;
}

/* ===== Contact Side Drawer ===== */
.contact-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.contact-drawer {
    position: fixed;
    top: 0;
    right: -450px;
    width: 400px;
    max-width: 90vw;
    height: 100%;
    background: white;
    z-index: 2001;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.2);
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    display: flex;
    flex-direction: column;
}

.drawer-active .contact-drawer-overlay {
    opacity: 1;
    visibility: visible;
}

.drawer-active .contact-drawer {
    right: 0;
}

.drawer-header {
    background: var(--primary-color, #1e40af);
    color: white;
    padding: 30px;
    position: relative;
}

.drawer-header h3 {
    color: white;
    margin: 0;
    font-family: 'Playfair Display', serif;
}

.drawer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.drawer-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.drawer-body {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.drawer-trigger-btn {
    position: fixed;
    right: 0;
    top: 30%;
    transform: translateY(-50%) rotate(-90deg);
    transform-origin: right bottom;
    background: var(--primary-color, #1e40af);
    color: white;
    padding: 12px 25px;
    border-radius: 12px 12px 0 0;
    cursor: pointer;
    z-index: 1000;
    font-weight: 600;
    box-shadow: -2px 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    border: none;
}

/* Animations */
@keyframes pulse-red {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.pulse-badge {
    animation: pulse-red 2s infinite;
}

/* Notice & Events */
.hover-white:hover {
    color: white !important;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.notice-item {
    transition: all 0.3s ease;
    cursor: pointer;
}

.notice-item:hover {
    background-color: white !important;
    transform: translateX(5px);
    box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.1) !important;
}

.event-date-box {
    min-width: 70px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Testimonials */
.testimonial-card {
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.italic {
    font-style: italic;
}

/* New CTA Card */
.cta-gradient-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    position: relative;
    border: none;
}