/* ==========================================================================
   CSS GLOBAL ENGINES & DESIGN ARCHITECTURE VARIABLES
   ========================================================================== */
:root {
    /* Color Palette Paradigm */
    --primary-color: #1e40af;       /* Deep Professional Blue */
    --primary-light: #3b82f6;      /* Vibrant Primary Accent Blue */
    --secondary-color: #0f172a;    /* Charcoal Navy for High Contrast */
    --accent-color: #10b981;       /* Success Green Emerald */
    --background-base: #f1f5f9;    /* Refactored Soft Gray-Blue for 3D Book Synergy */
    --background-card: #ffffff;    /* Pure White Canvas for Cards */
    --background-alt: #f8fafc;     /* Clean Soft Light Gray-Blue for Alternating Sections */
    --text-main: #1e293b;          /* Professional Dense Charcoal Slate Text */
    --text-muted: #64748b;         /* Modern Slate Secondary Muted Description Text */
    --border-color: #e2e8f0;       /* Fine Structural Grid Separation Lines */
    
    /* Layout Properties */
    --radius-standard: 8px;
    --radius-round: 16px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --container-width: 1200px;
}

/* ==========================================================================
   GLOBAL RESET FRAMEWORK & 3D PERSPECTIVE ENGINE
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-base);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    perspective: 2000px; /* Synchronized 3D Flip Engine Globally */
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 5rem 0;
}

.bg-light {
    background-color: var(--background-alt);
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   REUSABLE UI COMPONENTS (Buttons, Inputs, Typography, Badges)
   ========================================================================== */
h1, h2, h3, h4 {
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1.2;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3.5rem auto;
}

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

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Buttons Engine */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius-standard);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.2);
}

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

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: #ffffff;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

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

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
}

.btn-block {
    width: 100%;
}

/* Forms Processing Elements */
.form-container {
    background: #ffffff;
    padding: 2.5rem;
    border-radius: var(--radius-round);
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.form-group input, 
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-standard);
    outline: none;
    transition: var(--transition-smooth);
    font-family: inherit;
}

.form-group input:focus, 
.form-group select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.badge-new { background-color: rgba(16, 185, 129, 0.1); color: var(--accent-color); }
.badge-good { background-color: rgba(59, 130, 246, 0.1); color: var(--primary-light); }

/* ==========================================================================
   NAVIGATION IMPLEMENTATION LAYOUT
   ========================================================================== */
.header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--primary-light);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

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

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--secondary-color);
    cursor: pointer;
}

/* ==========================================================================
   HERO SECTION IMPLEMENTATION STYLE
   ========================================================================== */
.hero {
    padding: 6rem 0;
    background: radial-gradient(circle at 90% 10%, rgba(59, 130, 246, 0.05) 0%, rgba(255,255,255,1) 70%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
}

.hero-badge {
    display: inline-block;
    background-color: rgba(30, 64, 175, 0.07);
    color: var(--primary-color);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1.25rem;
}

.hero-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-graphic {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 40px rgba(30, 64, 175, 0.2);
    animation: morphingGraphic 10s ease-in-out infinite alternate;
}

.graphic-icon {
    font-size: 6rem;
    color: #ffffff;
}

.graphic-card {
    position: absolute;
    background: #ffffff;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-standard);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-1 { top: 10%; left: 0; color: var(--accent-color); }
.card-2 { bottom: 15%; right: 0; color: var(--primary-light); }

@keyframes morphingGraphic {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    100% { border-radius: 60% 40% 30% 70% / 60% 50% 50% 40%; }
}

/* ==========================================================================
   COLLEGE PREDICTOR SCHEMATICS LAYOUT
   ========================================================================== */
.predictor-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
    max-width: 1000px;
    margin: 0 auto;
}

.predictor-results {
    background: #ffffff;
    padding: 2.5rem;
    border-radius: var(--radius-round);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05);
}

.predictor-results h3 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    border-bottom: 2px solid var(--background-alt);
    padding-bottom: 0.75rem;
}

.colleges-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.college-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--background-alt);
    border-radius: var(--radius-standard);
    border-left: 4px solid var(--primary-light);
}

.match-percentage {
    background: var(--accent-color);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* ==========================================================================
   NEW HIGH-ATTENTION GATEWAY CARDS STYLING (HOMEPAGE)
   ========================================================================== */
.feature-gateways {
    background-color: var(--background-alt) !important;
}

.gateway-card {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.gateway-card:hover {
    transform: translateY(-8px) scale(1.02);
}

.gateway-card > div {
    transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
}

.gateway-card:hover > div {
    border-color: var(--primary-light) !important;
    box-shadow: 0 20px 30px rgba(15, 23, 42, 0.08) !important;
}

/* Dynamically sliding indicators inside cards on hover */
.gateway-card span i {
    transition: transform 0.2s ease;
}

.gateway-card:hover span i {
    transform: translateX(5px);
}

/* ==========================================================================
   BOOK & MARKETPLACE MATRIX STYLING
   ========================================================================== */
.marketplace-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.6fr;
    gap: 3rem;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

.book-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-standard);
    overflow: hidden;
    transition: var(--transition-smooth);
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.05);
}

.book-cover {
    height: 180px;
    background-color: var(--background-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

.book-details {
    padding: 1.25rem;
}

.book-details h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.book-author {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.book-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.book-price-row .price {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--secondary-color);
}

.form-card {
    background: var(--background-alt);
    padding: 2rem;
    border-radius: var(--radius-round);
    border: 1px solid var(--border-color);
    position: sticky;
    top: 110px;
}

.form-card h3 {
    margin-bottom: 1.25rem;
    font-size: 1.25rem;
}

/* ==========================================================================
   RESULT CHECKER MODAL INTERFACE DESIGN
   ========================================================================== */
.results-container {
    max-width: 550px;
    margin: 0 auto;
}

.result-form {
    background: #ffffff;
    padding: 2.5rem;
    border-radius: var(--radius-round);
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
}

/* Modal Core Setup Frame */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: #ffffff;
    width: 100%;
    max-width: 500px;
    border-radius: var(--radius-round);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalEntrance 0.3s ease-out;
    overflow: hidden;
}

.modal-header {
    background: var(--secondary-color);
    color: #ffffff;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #ffffff;
    font-size: 1.15rem;
}

.close-modal {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1.75rem;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 2rem;
}

@keyframes modalEntrance {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   COURSES GRID MATRIX SYSTEM
   ========================================================================== */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.course-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-round);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.06);
    border-color: var(--primary-light);
}

.course-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.tag-online { background-color: #e0f2fe; color: var(--primary-color); }
.tag-offline { background-color: #fef3c7; color: #b45309; }

.course-body {
    padding: 2.25rem 1.75rem 1.75rem 1.75rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.course-body h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.course-body p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.course-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--background-alt);
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.course-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--secondary-color);
}

/* ==========================================================================
   FOOTER SCHEMES
   ========================================================================== */
.footer {
    background-color: var(--secondary-color);
    color: #94a3b8;
    padding: 5rem 0 2rem 0;
    border-top: 4px solid var(--primary-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand .logo {
    color: #ffffff;
    display: inline-block;
    margin-bottom: 1.25rem;
}

.footer-brand p {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 38px;
    height: 38px;
    background: #1e293b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    transition: var(--transition-smooth);
}

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

.footer-links h4 {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.footer-links a {
    display: block;
    color: #94a3b8;
    text-decoration: none;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #1e293b;
    font-size: 0.85rem;
}

/* ==========================================================================
   PREMIUM SIGN-IN AND DIRECT BUTTON INTERFACES
   ========================================================================== */
.nav-login-btn {
    margin-left: 1rem;
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
    border-radius: 50px;
}

.login-modal-content {
    max-width: 400px;
}

/* ==========================================================================
   STUDONEXT PREMIUM 3D BOOK FLIP OPENING ENGINE
   ========================================================================== */
.book-page-open {
    opacity: 0;
    transform-origin: left center; 
    transform: rotateY(-90deg) translateZ(50px);
    filter: blur(2px);
    animation: realBookOpenEffect 1.5s cubic-bezier(0.25, 1, 0.5, 1) 0.1s forwards;
}

@keyframes realBookOpenEffect {
    0% {
        opacity: 0;
        transform: rotateY(-90deg) translateZ(50px);
        filter: blur(2px);
    }
    30% { opacity: 0.7; }
    100% {
        opacity: 1;
        transform: rotateY(0deg) translateZ(0);
        filter: blur(0);
    }
}

.book-element-popup {
    opacity: 0;
    transform: scale(0.9) translateZ(-30px);
    animation: bookElementFadeIn 1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.6s forwards;
}

@keyframes bookElementFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.9) translateZ(-30px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateZ(0);
    }
}

/* ==========================================================================
   LIVE EDUCATIONAL NEWS TICKER STYLING
   ========================================================================== */
.breaking-news-ticker {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    border-bottom: 2px solid #2563eb;
    height: 40px;
    overflow: hidden;
    margin: 0;
    padding: 0;
    width: 100%;
}

.ticker-title {
    background: #ff4757;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0 15px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 3px 0 10px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
}

.animate-bell { animation: bellRing 2s infinite; }

@keyframes bellRing {
    0%, 100% { transform: rotate(0); }
    10%, 30%, 50% { transform: rotate(15deg); }
    20%, 40%, 60% { transform: rotate(-15deg); }
    70% { transform: rotate(0); }
}

.ticker-content-wrap {
    overflow: hidden;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    background: #f8fafc;
}

.ticker-text-move {
    display: flex;
    white-space: nowrap;
    padding-left: 100%;
    animation: scrollTickerText 25s linear infinite;
}

.ticker-text-move:hover {
    animation-play-state: paused;
    cursor: pointer;
}

.ticker-text-move span {
    font-size: 0.88rem;
    font-weight: 500;
    color: #1e293b;
    padding-right: 50px;
}

@keyframes scrollTickerText {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* ==========================================================================
   GLOBAL FIXED WHATSAPP SUPPORT BUTTON (ANY SCREEN RATIO)
   ========================================================================== */
.whatsapp-support-floating {
    position: fixed !important;
    bottom: 25px !important;
    right: 25px !important;
    background-color: #25d366 !important;
    color: #ffffff !important;
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 32px !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25) !important;
    z-index: 9999999 !important;
    text-decoration: none !important;
    animation: whatsappLiveGlow 2s infinite !important;
}

@keyframes whatsappLiveGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
        transform: scale(1);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
        transform: scale(1.04);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
        transform: scale(1);
    }
}

.whatsapp-support-floating:hover {
    transform: scale(1.1) translateY(-5px) !important;
    background-color: #128c7e !important;
}

/* ==========================================================================
   MEDIA QUERY STYLING STRUCTURE FOR CROSS-DEVICE COMPATIBILITY
   ========================================================================== */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }
    .hero-content h1 { font-size: 2.75rem; }
    .hero-actions { justify-content: center; }
    .hero-image-placeholder { order: -1; }
    
    .predictor-wrapper { grid-template-columns: 1fr; max-width: 600px; }
    .marketplace-grid { grid-template-columns: 1fr; }
    .form-card { position: static; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}

@media (max-width: 768px) {
    .menu-toggle { display: block; }
    
    .nav-menu {
        position: absolute;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: #ffffff;
        flex-direction: column;
        padding: 2.5rem;
        gap: 1.75rem;
        transition: var(--transition-smooth);
        box-shadow: 0 15px 20px rgba(0,0,0,0.05);
    }
    
    .nav-menu.active { left: 0; }
    .footer-grid { grid-template-columns: 1fr; }
    
    .nav-login-btn {
        margin-left: 0;
        margin-top: 1rem;
        width: 100%;
    }
    
    .whatsapp-support-floating {
        width: 52px !important;
        height: 52px !important;
        font-size: 28px !important;
        bottom: 20px !important;
        right: 20px !important;
    }
}

@media (max-width: 480px) {
    .hero-content h1 { font-size: 2.25rem; }
    .hero-actions { flex-direction: column; width: 100%; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .section-header h2 { font-size: 1.75rem; }
}