/* =========================================
   DESIGN TOKENS & VARIABLES
   ========================================= */
:root {
    /* Colors */
    --primary: #0F766E;          /* Teal 600 - Main Islamic/Educational tone */
    --primary-light: #14B8A6;    /* Teal 400 */
    --primary-dark: #115E59;     /* Teal 700 */
    --accent: #F59E0B;           /* Amber 500 - For highlights/CTA */
    --accent-hover: #D97706;     /* Amber 600 */
    
    --bg-light: #F8FAFC;         /* Slate 50 */
    --bg-white: #FFFFFF;
    
    --text-main: #0F172A;        /* Slate 900 */
    --text-muted: #64748B;       /* Slate 500 */
    
    --border-color: #E2E8F0;     /* Slate 200 */
    
    /* Card Accent Colors */
    --color-blue: #3B82F6;
    --color-orange: #F97316;
    --color-green: #10B981;
    
    /* Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --font-arabic: 'Amiri', serif;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-hover: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   RESET & GLOBAL
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
}

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

ul {
    list-style: none;
}

strong {
    color: var(--primary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.bg-blue { background-color: var(--color-blue); color: white; }
.bg-orange { background-color: var(--color-orange); color: white; }
.bg-green { background-color: var(--color-green); color: white; }

/* =========================================
   BUTTONS
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: 9999px; /* Pill shape */
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    gap: 8px;
}

.btn i {
    font-size: 0.9em;
}

.btn-primary {
    background-color: var(--accent);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(245, 158, 11, 0.39);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(245, 158, 11, 0.45);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

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

.btn-large {
    padding: 16px 36px;
    font-size: 1.125rem;
}

/* =========================================
   1. HEADER
   ========================================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: var(--transition);
    height: 80px;
    display: flex;
    align-items: center;
}

.header.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    height: 70px;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-text {
    font-family: var(--font-arabic);
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-dark);
    letter-spacing: -0.5px;
}

.logo-accent {
    color: var(--accent);
}

.text-white {
    color: white;
}

.main-nav ul {
    display: flex;
    gap: 32px;
}

.main-nav a {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 1rem;
    position: relative;
}

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

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
    border-radius: 2px;
}

/* =========================================
   2. HERO SECTION
   ========================================= */
.hero {
    position: relative;
    padding: 160px 0 100px;
    min-height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/hero_background.png');
    background-size: cover;
    background-position: center;
    z-index: -1;
}

/* Fallback/Overlay to ensure text is readable and rich */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
    z-index: -1;
}
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255,255,255,0.8), rgba(255,255,255,0.95) 70%);
    z-index: -1;
}

.hero-content {
    max-width: 680px;
    animation: fadeInUp 1s ease-out;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background-color: rgba(15, 118, 110, 0.1);
    color: var(--primary);
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 24px;
    border: 1px solid rgba(15, 118, 110, 0.2);
}

.hero-title {
    font-size: 4rem;
    letter-spacing: -1px;
    margin-bottom: 24px;
}

.hero-title strong {
    color: var(--primary);
    position: relative;
    white-space: nowrap;
}

/* Decoration under "Bahasa Arab" */
.hero-title strong::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 0;
    width: 100%;
    height: 12px;
    background-color: rgba(245, 158, 11, 0.3);
    z-index: -1;
    border-radius: 4px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    font-weight: 400;
    line-height: 1.8;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   3. KONTEN UTAMA: PILIH KELAS
   ========================================= */
.classes-section {
    padding: 100px 0;
    background-color: var(--bg-white);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
    max-width: 600px;
    margin-inline: auto;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
    color: var(--text-main);
}

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

.grid {
    display: grid;
    gap: 30px;
}

.classes-grid {
    grid-template-columns: repeat(3, 1fr);
}

.class-card {
    background-color: var(--bg-white);
    border-radius: 24px;
    padding: 40px 32px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.class-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-8px);
    border-color: transparent;
}

.card-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 24px;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.card-desc {
    color: var(--text-muted);
    margin-bottom: 32px;
    font-size: 1rem;
    line-height: 1.6;
}

.card-link {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    color: var(--primary);
    gap: 8px;
}

.card-link:hover {
    gap: 12px;
}

.class-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.class-card:hover::before {
    transform: scaleX(1);
}

/* =========================================
   4. AREA FITUR UNGGULAN
   ========================================= */
.features-section {
    padding: 100px 0;
    background-color: var(--bg-light);
    border-top: 1px solid var(--border-color);
}

.features-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.features-text h2 {
    font-size: 2.5rem;
    margin-bottom: 24px;
}

.features-text p {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.feature-item {
    display: flex;
    gap: 20px;
    background-color: var(--bg-white);
    padding: 24px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid transparent;
}

.feature-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
    transform: translateX(8px);
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: rgba(15, 118, 110, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.feature-content h4 {
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: var(--text-main);
}

.feature-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* =========================================
   5. FOOTER
   ========================================= */
.footer {
    background-color: var(--primary-dark);
    color: white;
    padding: 80px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-desc {
    color: rgba(255, 255, 255, 0.7);
    margin-top: 24px;
    max-width: 400px;
}

.footer h4 {
    font-size: 1.25rem;
    margin-bottom: 24px;
    color: white;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
}

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

.social-icons {
    display: flex;
    gap: 16px;
}

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

.social-icons a:hover {
    background-color: var(--accent);
    transform: translateY(-4px);
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 1024px) {
    .classes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-title {
        font-size: 3.5rem;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 0 16px;
    }
    .main-nav {
        display: none; /* In a real app, we'd add a hamburger menu */
    }
    
    .hero {
        padding: 120px 0 80px;
        text-align: center;
    }
    .hero-content {
        margin: 0 auto;
    }
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .classes-grid {
        grid-template-columns: 1fr;
    }
    
    .features-wrapper {
        grid-template-columns: 1fr;
    }
    .features-text {
        text-align: center;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* =========================================
   AUTHENTICATION PAGES (Register/Login)
   ========================================= */
.auth-page {
    /* Latar belakang abu-abu terang dengan sedikit pattern/gradasi */
    background-color: #F1F5F9; /* Slate 100 */
    background-image: radial-gradient(rgba(15, 118, 110, 0.05) 2px, transparent 2px), radial-gradient(rgba(15, 118, 110, 0.05) 2px, transparent 2px);
    background-size: 32px 32px;
    background-position: 0 0, 16px 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-back {
    padding: 24px;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

.back-btn {
    background-color: white; /* Make background white to stand out from pattern bg */
    padding: 8px 16px;
    font-size: 0.9rem;
}

.auth-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 24px 40px;
}

.auth-card {
    background-color: var(--bg-white);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 540px;
    padding: 48px;
    position: relative;
    overflow: hidden;
    /* Optional: Subtle top border for neatness */
    border-top: 4px solid var(--primary);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    justify-content: center;
    margin-bottom: 24px;
}

.auth-title {
    font-size: 2rem;
    margin-bottom: 8px;
    color: var(--text-main);
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-main);
}

.form-group input,
.form-group select {
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-light);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-main);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
    background-color: white;
}

.form-group input::placeholder {
    color: #94A3B8;
}

.form-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 4px;
}

.form-hint i {
    margin-top: 3px;
    color: var(--primary-light);
}

/* Custom Select */
.select-wrapper {
    position: relative;
}

.select-wrapper select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

.select-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

/* Password Wrapper */
.password-wrapper {
    position: relative;
}

.password-wrapper input {
    width: 100%;
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    font-size: 1.1rem;
}

.password-toggle:hover {
    color: var(--primary);
}

.auth-divider {
    border: none;
    border-top: 1px dashed var(--border-color);
    margin: 8px 0;
}

/* Feature Box */
.auth-feature-box {
    background-color: rgba(15, 118, 110, 0.05);
    border: 1px solid rgba(15, 118, 110, 0.1);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 8px;
}

.feature-box-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.feature-box-icon {
    color: var(--primary);
    font-size: 1.25rem;
    background-color: white;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.feature-box-header h4 {
    font-size: 1.1rem;
    color: var(--primary-dark);
    margin: 0;
}

.feature-box-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.5;
}

.auth-submit {
    width: 100%;
    margin-top: 8px;
    justify-content: center;
}

.auth-footer {
    text-align: center;
    margin-top: 32px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.auth-link {
    color: var(--primary);
    font-weight: 600;
}

.auth-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Responsive auth card */
@media (max-width: 640px) {
    .auth-card {
        padding: 32px 24px;
        border-radius: 16px;
    }
    .auth-wrapper {
        padding-top: 80px;
    }
}
