/* ==========================================================================
   JomSkol Standalone Public Portal Stylesheet
   Tagline: My Platform for Administration, School, Teaching & Information
   Design: Modern Multi-Level Educational SaaS Aesthetic (Emerald, Teal, Gold, Purple)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    /* Brand Color Palette */
    --primary: #059669;
    --primary-hover: #047857;
    --primary-light: #ecfdf5;
    --secondary: #d97706;
    --secondary-hover: #b45309;
    --secondary-light: #fffbeb;
    --accent: #0d9488;
    --purple: #7c3aed;
    --purple-light: #f5f3ff;
    --dark: #0f172a;
    --dark-surface: #1e293b;
    --text-main: #334155;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    
    /* Dynamic UI Variables */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.04);
    --shadow-md: 0 10px 25px -5px rgba(5, 150, 105, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 20px 35px -10px rgba(15, 23, 42, 0.12);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Settings */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--dark);
    font-weight: 700;
    line-height: 1.25;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

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

/* Container */
.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Utilities */
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.badge-primary {
    background: rgba(5, 150, 105, 0.1);
    color: var(--primary);
    border: 1px solid rgba(5, 150, 105, 0.2);
}
.badge-gold {
    background: rgba(217, 119, 6, 0.12);
    color: var(--secondary);
    border: 1px solid rgba(217, 119, 6, 0.25);
}
.badge-purple {
    background: rgba(124, 58, 237, 0.1);
    color: var(--purple);
    border: 1px solid rgba(124, 58, 237, 0.2);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.4rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    white-space: nowrap;
    transition: var(--transition);
}
.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.45);
}
.btn-secondary {
    background-color: var(--secondary);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.3);
}
.btn-secondary:hover {
    background-color: var(--secondary-hover);
    transform: translateY(-2px);
}
.btn-purple {
    background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
}
.btn-purple:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.45);
}
.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}
.btn-outline:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
}
.btn-white {
    background-color: #ffffff;
    color: var(--dark);
    box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}
.btn-white:hover {
    background-color: #f1f5f9;
    transform: translateY(-2px);
}

/* Header & Navbar - Clean, Anti-Collision Layout */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    transition: var(--transition);
}
.site-header.scrolled {
    box-shadow: var(--shadow-sm);
    background: rgba(255, 255, 255, 0.98);
}
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 75px;
    gap: 1.5rem;
}
.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    white-space: nowrap;
}
.brand-logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
}
.brand-logo span.logo-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    list-style: none;
    margin: 0 auto;
}
.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
    white-space: nowrap;
    position: relative;
    padding: 0.4rem 0;
}
.nav-link:hover {
    color: var(--primary);
}
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* 3 Login Section Dropdown */
.login-dropdown-wrapper {
    position: relative;
    display: inline-block;
}
.login-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 1100;
    margin-top: 0.5rem;
}
.login-dropdown-wrapper:hover .login-dropdown-menu,
.login-dropdown-wrapper:focus-within .login-dropdown-menu {
    display: flex;
}
.portal-login-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.portal-login-item:hover {
    background: var(--bg-light);
}
.portal-login-item.admin-portal:hover { background: var(--primary-light); }
.portal-login-item.branch-portal:hover { background: var(--secondary-light); }
.portal-login-item.parent-portal:hover { background: var(--purple-light); }

.portal-login-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.portal-login-item.admin-portal .portal-login-icon { background: var(--primary-light); color: var(--primary); }
.portal-login-item.branch-portal .portal-login-icon { background: var(--secondary-light); color: var(--secondary); }
.portal-login-item.parent-portal .portal-login-icon { background: var(--purple-light); color: var(--purple); }

.portal-login-text h5 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
}
.portal-login-text p {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.2;
}

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

/* Hero Section */
.hero-section {
    padding: 135px 0 85px;
    position: relative;
    background: radial-gradient(circle at 80% 20%, rgba(5, 150, 105, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 10% 80%, rgba(217, 119, 6, 0.06) 0%, transparent 40%);
}
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    align-items: center;
}
.hero-content h1 {
    font-size: 3rem;
    letter-spacing: -0.02em;
    margin: 1.25rem 0 1rem;
    color: var(--dark);
}
.hero-content h1 span {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-content p.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* School Level Badges */
.school-level-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
}
.level-badge {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.3rem 0.85rem;
    border-radius: 50px;
    background: #e2e8f0;
    color: #334155;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}
.hero-visual {
    position: relative;
}
.hero-card-main {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    position: relative;
    z-index: 2;
}
.hero-card-decoration {
    position: absolute;
    top: -20px;
    right: -20px;
    bottom: -20px;
    left: -20px;
    background: linear-gradient(135deg, rgba(5,150,105,0.15), rgba(217,119,6,0.15));
    border-radius: calc(var(--radius-xl) + 10px);
    z-index: 1;
    filter: blur(20px);
}

/* Quick Stats Bar */
.stats-bar {
    margin-top: -30px;
    position: relative;
    z-index: 10;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    background: var(--bg-white);
    padding: 2rem 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}
.stat-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}
.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.stat-number {
    font-family: 'Outfit', sans-serif;
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--dark);
    line-height: 1;
}
.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    font-weight: 500;
}

/* Section Header */
.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 3.5rem;
}
.section-header h2 {
    font-size: 2.25rem;
    margin: 0.75rem 0 1rem;
}
.section-header p {
    font-size: 1.05rem;
    color: var(--text-muted);
}

/* Features Section */
.features-section {
    padding: 90px 0;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.feature-card {
    background: var(--bg-white);
    padding: 2.5rem 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: rgba(5, 150, 105, 0.3);
}
.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary-light) 0%, rgba(13, 148, 136, 0.15) 100%);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}
.feature-card h3 {
    font-size: 1.35rem;
    margin-bottom: 0.85rem;
}
.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* SaaS Pricing Section */
.pricing-section {
    padding: 90px 0;
    background: #f8fafc;
}
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.pricing-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
}
.pricing-card.popular {
    border: 2px solid var(--primary);
    box-shadow: var(--shadow-md);
}
.popular-badge {
    position: absolute;
    top: -14px;
    right: 24px;
    background: var(--primary);
    color: white;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.3rem 0.85rem;
    border-radius: 50px;
}
.pricing-header h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}
.pricing-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}
.pricing-price {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
.pricing-price .amount {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
}
.pricing-features {
    list-style: none;
    margin-bottom: 2rem;
}
.pricing-features li {
    font-size: 0.9rem;
    padding: 0.5rem 0;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed #f1f5f9;
}

/* Branch Search Section */
.branch-section {
    padding: 90px 0;
    background: #ffffff;
}
.search-box-wrap {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2.5rem;
    border: 1px solid var(--border-color);
}
.search-form {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 1rem;
}
.form-input, .form-select {
    width: 100%;
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    background: #ffffff;
    transition: var(--transition);
}
.form-input:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}
.branch-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.branch-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.branch-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}
.branch-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
}
.branch-badge {
    font-size: 0.78rem;
    background: #e2e8f0;
    color: #475569;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 0.75rem;
}
.branch-info {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}
.branch-action {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* CTA Showcase Banner */
.cta-banner {
    padding: 90px 0;
    position: relative;
    overflow: hidden;
}
.cta-box {
    background: linear-gradient(135deg, #064e3b 0%, #059669 60%, #0d9488 100%);
    border-radius: var(--radius-xl);
    padding: 4rem 3rem;
    color: #ffffff;
    position: relative;
    box-shadow: var(--shadow-lg);
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2.5rem;
    align-items: center;
}
.cta-box h2 {
    color: #ffffff;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}
.cta-box p {
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Footer */
.site-footer {
    background: var(--dark);
    color: var(--text-light);
    padding: 70px 0 30px;
    font-size: 0.9rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 3.5rem;
}
.footer-col h4 {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
}
.footer-col ul {
    list-style: none;
}
.footer-col ul li {
    margin-bottom: 0.75rem;
}
.footer-col ul li a:hover {
    color: var(--primary-light);
}
.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Responsive Media Queries */
@media (max-width: 1100px) {
    .nav-menu { gap: 0.85rem; }
    .nav-link { font-size: 0.85rem; }
    .btn { padding: 0.65rem 1.1rem; font-size: 0.85rem; }
}

@media (max-width: 992px) {
    .nav-menu {
        position: fixed;
        top: 75px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 75px);
        background: var(--bg-white);
        flex-direction: column;
        justify-content: center;
        transition: var(--transition);
        padding: 2rem;
        gap: 1.5rem;
    }
    .nav-menu.active { left: 0; }
    .nav-toggle { display: block; }
    .nav-actions { display: none; }
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-cta { justify-content: center; }
    .school-level-badges { justify-content: center; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .pricing-grid { grid-template-columns: 1fr; }
    .branch-grid { grid-template-columns: repeat(2, 1fr); }
    .cta-box { grid-template-columns: 1fr; text-align: center; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    .hero-content h1 { font-size: 2.2rem; }
    .stats-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .branch-grid { grid-template-columns: 1fr; }
    .search-form { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
}
