/* ========================================
   EduManager - Premium School Management System
   Landing Page Custom Styles
   ======================================== */

/* Google Font Import */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* CSS Variables */
:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #818cf8;
    --secondary: #06b6d4;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --dark: #1e293b;
    --dark-light: #334155;
    --light: #f8fafc;
    --white: #ffffff;
    --gray: #64748b;
    --gradient-primary: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 5px 30px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    --transition: all 0.3s ease;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--dark);
    background: var(--light);
    overflow-x: hidden;
    line-height: 1.7;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
    padding: 0;
}

img {
    max-width: 100%;
    height: auto;
}

.section-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
}

.section-badge i {
    margin-right: 5px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--dark);
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn {
    border-radius: var(--radius-md);
    padding: 12px 30px;
    font-weight: 600;
    font-size: 15px;
    transition: var(--transition);
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    color: var(--white);
    box-shadow: 0 5px 20px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.4);
    background: var(--primary-dark);
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-outline-light:hover {
    background: var(--white);
    color: var(--primary);
}

/* ========================================
   Preloader Styles
   ======================================== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.preloader.hide {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.loader {
    text-align: center;
}

.loader p {
    margin-top: 20px;
    color: var(--primary);
    font-weight: 600;
}

.book {
    width: 50px;
    height: 70px;
    position: relative;
    margin: 0 auto;
}

.book-page {
    position: absolute;
    width: 50px;
    height: 70px;
    background: var(--primary);
    border-radius: 5px;
    transform-origin: left;
    animation: pageFlip 1.5s ease-in-out infinite;
}

.book-page:nth-child(1) {
    animation-delay: 0s;
}

.book-page:nth-child(2) {
    background: var(--primary-dark);
    animation-delay: 0.15s;
}

.book-page:nth-child(3) {
    background: var(--primary-light);
    animation-delay: 0.3s;
}

@keyframes pageFlip {
    0%, 100% {
        transform: rotateY(0deg);
    }
    50% {
        transform: rotateY(-30deg);
    }
}

/* ========================================
   Scroll to Top Button
   ======================================== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 1000;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* ========================================
   Navbar Styles
   ======================================== */
.navbar {
    padding: 15px 0;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white) !important;
}

.navbar-brand i {
    color: var(--primary-light);
}

.nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
    padding: 8px 15px !important;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15px;
    width: 0;
    height: 2px;
    background: var(--primary-light);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: calc(100% - 30px);
}

.btn-login {
    padding: 10px 25px !important;
    border-radius: var(--radius-lg) !important;
}

.navbar-toggler {
    border: none;
    padding: 5px;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* ========================================
   Hero Section Styles
   ======================================== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: var(--dark);
    overflow: hidden;
}

@media (max-width: 575px) {
    .hero-section {
        min-height: auto;
        padding-top: 90px;
        padding-bottom: 60px;
        align-items: flex-start;
    }
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.9) 0%, rgba(6, 182, 212, 0.8) 100%);
}

.hero-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
}

.shape-1 {
    width: 600px;
    height: 600px;
    background: var(--white);
    top: -200px;
    right: -200px;
    animation: float 20s ease-in-out infinite;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: var(--white);
    bottom: -100px;
    left: -100px;
    animation: float 15s ease-in-out infinite reverse;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: var(--white);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 10s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, 30px); }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-block;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 20px;
    backdrop-filter: blur(5px);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
    max-width: 500px;
}

.hero-buttons {
    margin-bottom: 40px;
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.stat-item h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 5px;
}

.stat-item p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.hero-image {
    position: relative;
    height: 400px;
}

.floating-card {
    position: absolute;
    background: var(--white);
    padding: 15px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 15px;
    animation: floatCard 5s ease-in-out infinite;
}

.floating-card i {
    font-size: 2rem;
    color: var(--primary);
}

.floating-card h5 {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.floating-card p {
    font-size: 12px;
    color: var(--gray);
    margin: 0;
}

.card-1 { top: 30%; left: 10%; animation-delay: 0s; }
.card-2 { top: 55%; right: 5%; animation-delay: 1s; }
.card-3 { bottom: 10%; left: 25%; animation-delay: 2s; }

@keyframes floatCard {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.hero-scroll {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.scroll-indicator {
    display: block;
    text-align: center;
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    position: relative;
    margin: 0 auto;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--white);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 2s ease-in-out infinite;
}

@keyframes scrollWheel {
    0%, 100% { opacity: 1; transform: translateX(-50%) translateY(0); }
    50% { opacity: 0.5; transform: translateX(-50%) translateY(10px); }
}

/* ========================================
   About Section Styles
   ======================================== */
.about-section {
    padding: 100px 0;
    background: var(--white);
}

.about-image {
    position: relative;
}

.about-image img {
    box-shadow: var(--shadow-lg);
}

.about-experience {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: var(--gradient-primary);
    padding: 20px 30px;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.about-experience h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0;
}

.about-experience p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    margin: 0;
}

.about-content {
    padding-left: 30px;
}

.about-text {
    color: var(--gray);
    margin-bottom: 30px;
}

.about-features {
    margin-bottom: 30px;
}

.about-features .feature-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.about-features .feature-icon {
    width: 50px;
    height: 50px;
    background: rgba(79, 70, 229, 0.1);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.about-features .feature-icon i {
    font-size: 1.2rem;
    color: var(--primary);
}

.about-features h5 {
    font-weight: 600;
    margin-bottom: 5px;
}

.about-features p {
    font-size: 14px;
    color: var(--gray);
    margin: 0;
}

/* ========================================
   Features Section Styles
   ======================================== */
.features-section {
    padding: 100px 0;
    background: var(--light);
}

.section-header { margin-bottom: 60px; }

.section-subtitle {
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
}

.feature-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.feature-card:hover::before { transform: scaleX(1); }

.feature-card .feature-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-card .feature-icon i {
    font-size: 1.8rem;
    color: var(--white);
}

.feature-card h4 {
    font-weight: 600;
    margin-bottom: 15px;
}

.feature-card p {
    color: var(--gray);
    font-size: 15px;
    margin-bottom: 20px;
}

.feature-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.feature-tags span {
    padding: 5px 12px;
    background: var(--light);
    border-radius: 50px;
    font-size: 12px;
    color: var(--gray);
    font-weight: 500;
}

/* ========================================
   Testimonials Section Styles
   ======================================== */
.testimonials-section {
    padding: 100px 0;
    background: var(--white);
}

.testimonial-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    position: relative;
}

.testimonial-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 20px;
    overflow: hidden;
    border: 4px solid var(--primary-light);
}

.testimonial-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-text {
    font-style: italic;
    color: var(--gray);
    margin-bottom: 20px;
}

.testimonial-author h5 {
    font-weight: 600;
    margin-bottom: 5px;
}

.testimonial-author p {
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 10px;
}

.testimonial-rating { color: var(--accent); }
.testimonial-rating i { font-size: 14px; }

/* ========================================
   Contact Section Styles
   ======================================== */
.contact-section {
    padding: 100px 0;
    background: var(--light);
}

.contact-text { color: var(--gray); margin-bottom: 30px; }

.contact-details { margin-bottom: 30px; }

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: rgba(79, 70, 229, 0.1);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon i { font-size: 1.2rem; color: var(--primary); }
.contact-item h5 { font-weight: 600; margin-bottom: 5px; }
.contact-item p { color: var(--gray); margin: 0; }

.social-links {
    display: flex;
    gap: 10px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.contact-form-wrapper {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.contact-form .form-control,
.contact-form .form-select {
    border: 2px solid #e2e8f0;
    padding: 15px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.contact-form .form-control:focus,
.contact-form .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.form-floating label { color: var(--gray); padding-left: 15px; }
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label { color: var(--primary); }

/* ========================================
   Footer Styles
   ======================================== */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 70px 0 0;
}

.footer-brand .navbar-brand {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.footer-text {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
}

.footer-links h5 {
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--white);
}

.footer-links ul li { margin-bottom: 12px; }

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-light);
    padding-left: 5px;
}

.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.newsletter-form input::placeholder { color: rgba(255, 255, 255, 0.5); }

.newsletter-form button {
    padding: 12px 20px;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-md);
    color: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover { background: var(--primary-dark); }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    margin-top: 50px;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

/* ========================================
    Responsive Styles
    ======================================== */
@media (max-width: 1199px) {
    .hero-title { font-size: 3rem; }
}

@media (max-width: 991px) {
    .navbar { background: var(--dark); padding: 10px 0; }
    .navbar-collapse {
        background: var(--dark);
        padding: 20px;
        border-radius: var(--radius-md);
        margin-top: 15px;
    }
    .navbar-nav .nav-item.d-lg-none .nav-link {
        border-radius: var(--radius-md);
        padding: 12px 20px;
        margin: 8px 0;
        background: var(--primary);
    }
    .about-content {
        padding-left: 0;
        margin-top: 40px;
    }
    .hero-title { font-size: 2.5rem; }
    .hero-image { display: none; }
    .about-image { margin-bottom: 40px; }
}

@media (max-width: 767px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    .scroll-to-top i {
        font-size: 16px;
    }
    .navbar { padding: 8px 0; }
    .navbar-nav .nav-item.d-lg-none .nav-link {
        font-weight: 600;
    }
    .navbar-brand { font-size: 1.5rem; }
    .hero-subtitle { font-size: 1rem; }
    .hero-title { font-size: 2rem; }
    .hero-stats { gap: 20px; }
    .stat-item h3 { font-size: 1.5rem; }
    .newsletter-form { flex-direction: column; }
    .hero-section { padding: 80px 0; }
    .about-section, .features-section, .testimonials-section, .contact-section { padding: 60px 0; }
    .feature-card { padding: 20px; }
    .testimonial-card { padding: 20px; }
    .floating-card { display: none; }
}

@media (max-width: 575px) {
    .section-title { font-size: 2rem; }
    .hero-title { font-size: 2rem; }
    .hero-stats { gap: 20px; }
    .stat-item h3 { font-size: 1.5rem; }
    .newsletter-form { flex-direction: column; }
    .hero-section { padding: 80px 0; }
    .about-section, .features-section, .testimonials-section, .contact-section { padding: 60px 0; }
    .feature-card { padding: 20px; }
    .testimonial-card { padding: 20px; }
    .floating-card { display: none; }
}

@media (max-width: 575px) {
    .btn-lg {
        padding: 10px 20px;
        font-size: 14px;
    }
    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    .hero-buttons .btn { width: 100%; text-align: center; }
    .contact-form-wrapper { padding: 25px; }
    .section-badge { font-size: 12px; padding: 6px 14px; }
    .section-title { font-size: 1.75rem; }
    .hero-subtitle { font-size: 1rem; }
    .hero-stats { flex-direction: column; gap: 15px; }
    .about-experience { padding: 15px 20px; right: -10px; bottom: -10px; }
    .about-experience h3 { font-size: 1.75rem; }
    .feature-card .feature-icon { width: 50px; height: 50px; }
    .feature-card .feature-icon i { font-size: 1.4rem; }
    .contact-form-wrapper { border-radius: var(--radius-md); }
    .social-links { justify-content: center; }
    .footer { padding: 50px 0 0; }
    .footer-links { margin-bottom: 30px; }
    .newsletter-form button { width: 100%; }
}

/* =============================================
   EXTRA MOBILE POLISH
   ============================================= */

/* Hero section: proper top padding on very small phones */
@media (max-width: 480px) {
    .hero-section {
        padding-top: 90px;
        padding-bottom: 50px;
    }
    .hero-title { font-size: 1.8rem; }
    .hero-badge { font-size: 12px; padding: 8px 14px; }
    .hero-subtitle { font-size: 0.95rem; }
    .section-title { font-size: 1.5rem; }
    .section-badge { font-size: 11px; }
    .hero-scroll { display: none; }
}

/* Footer stacking on small devices */
@media (max-width: 575px) {
    .footer-bottom p { font-size: 13px; }
    .footer-links h5 { margin-bottom: 12px; }
    .newsletter-form {
        flex-direction: column;
        gap: 8px;
    }
    .newsletter-form input,
    .newsletter-form button {
        width: 100%;
        border-radius: var(--radius-md) !important;
    }
}

/* About section image experience badge on mobile */
@media (max-width: 575px) {
    .about-experience {
        position: relative;
        right: auto;
        bottom: auto;
        margin-top: 16px;
        display: inline-block;
        width: auto;
    }
    .about-image { text-align: center; }
}

/* Testimonial cards on mobile */
@media (max-width: 575px) {
    .testimonial-card {
        padding: 20px 16px;
    }
}

/* Feature cards – min-height reset on mobile */
@media (max-width: 575px) {
    .feature-card { min-height: unset; }
}