/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --light-bg: #ecf0f1;
    --white: #ffffff;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --border-color: #bdc3c7;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #f5f7fa;
    /* Islamic geometric star pattern */
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%233498db' fill-opacity='0.04'%3E%3Cpath d='M30 0l5 10h10l-8 6 3 10-10-7-10 7 3-10-8-6h10z'/%3E%3Cpath d='M30 30l5 10h10l-8 6 3 10-10-7-10 7 3-10-8-6h10z'/%3E%3Cpath d='M0 30l5 10h10l-8 6 3 10-10-7-10 7 3-10-8-6h10z'/%3E%3Cpath d='M60 30l5 10h10l-8 6 3 10-10-7-10 7 3-10-8-6h10z'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 60px 60px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    background-color: var(--primary-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 600;
}

.logo-img {
    height: 50px;
    width: auto;
    margin-right: 1rem;
    vertical-align: middle;
}

.logo {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

.nav-menu a:hover,
.nav-menu a.active {
    background-color: var(--secondary-color);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background-color: var(--white);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.85) 0%, rgba(52, 152, 219, 0.85) 100%), url('../images/logo-smp-quran.png');
    background-size: cover, contain;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
    color: var(--white);
    padding: 6rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='0.5' opacity='0.15'%3E%3Cpath d='M50 20 Q60 30 50 40 Q40 30 50 20z'/%3E%3Cpath d='M50 60 Q60 70 50 80 Q40 70 50 60z'/%3E%3Cpath d='M20 50 Q30 60 40 50 Q30 40 20 50z'/%3E%3Cpath d='M60 50 Q70 60 80 50 Q70 40 60 50z'/%3E%3Ccircle cx='50' cy='50' r='15' stroke-width='1'/%3E%3Cpath d='M50 0 L50 20 M50 80 L50 100 M0 50 L20 50 M80 50 L100 50'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 100px 100px;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-secondary {
    background-color: var(--border-color);
    color: var(--text-dark);
}

.btn-secondary:hover {
    background-color: #95a5a6;
}

/* Sections */
section {
    padding: 4rem 0;
}

.welcome {
    background-color: var(--white);
    text-align: center;
}

.welcome h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 2rem;
}

.welcome p {
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Features Grid */
.features {
    background-color: var(--light-bg);
}

.features h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 3rem;
    font-size: 2rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-item {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.feature-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 3rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1' opacity='0.08'%3E%3Cpath d='M40 0 L60 20 L60 40 L40 60 L20 40 L20 20 Z'/%3E%3Cpath d='M40 20 L50 30 L40 40 L30 30 Z'/%3E%3Cpath d='M0 40 L20 20 M60 20 L80 40 M80 40 L60 60 M20 60 L0 40'/%3E%3Ccircle cx='40' cy='40' r='8'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 80px 80px;
    opacity: 0.4;
    pointer-events: none;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

/* Content Section */
.content-section {
    padding: 3rem 0;
    background-color: transparent;
}

.content-section:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.5);
    background-image: url("data:image/svg+xml,%3Csvg width='120' height='120' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%233498db' stroke-width='0.5' opacity='0.06'%3E%3Cpath d='M60 0 L90 30 L60 60 L30 30 Z'/%3E%3Cpath d='M60 60 L90 90 L60 120 L30 90 Z'/%3E%3Cpath d='M0 60 L30 90 L60 60 L30 30 Z'/%3E%3Cpath d='M60 60 L90 90 L120 60 L90 30 Z'/%3E%3Cpath d='M45 45 L60 60 L75 45 L60 30 Z'/%3E%3Cpath d='M45 75 L60 90 L75 75 L60 60 Z'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 120px 120px;
}

.info-card {
    background-color: var(--white);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.info-card h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--secondary-color);
}

.info-card h3 {
    color: var(--secondary-color);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.highlight-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
}

.highlight-card h2,
.highlight-card h3 {
    color: var(--white);
    border-bottom-color: rgba(255,255,255,0.3);
}

/* Tables */
.info-table,
.fee-table,
.curriculum-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.info-table td,
.fee-table td,
.fee-table th,
.curriculum-table td,
.curriculum-table th {
    padding: 0.8rem;
    border-bottom: 1px solid var(--border-color);
}

.info-table td:first-child {
    font-weight: 600;
    width: 35%;
    color: var(--text-dark);
}

.fee-table thead,
.curriculum-table thead {
    background-color: var(--secondary-color);
    color: var(--white);
}

.fee-table thead th,
.curriculum-table thead th {
    font-weight: 600;
    text-align: left;
}

.total-row {
    background-color: var(--light-bg);
    font-weight: 700;
}

.note {
    font-size: 0.9rem;
    color: var(--accent-color);
    font-style: italic;
    margin-top: 0.5rem;
}

/* Lists */
.mission-list,
.requirements-list,
.included-list,
.achievement-list,
.character-list,
.contact-list,
.payment-methods {
    list-style: none;
    padding-left: 0;
}

.mission-list li,
.requirements-list li,
.included-list li,
.achievement-list li,
.character-list li,
.contact-list li,
.payment-methods li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.mission-list li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

/* Facilities & Extracurricular */
.facilities-grid,
.extracurricular-grid,
.scholarship-grid,
.assessment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.facility-item,
.extra-category,
.scholarship-item,
.assessment-item {
    background-color: var(--light-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
}

.facility-item h3,
.scholarship-item h3,
.assessment-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.extra-category h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.extra-category ul {
    list-style: none;
}

.extra-category li {
    padding: 0.3rem 0;
    padding-left: 1.2rem;
    position: relative;
}

.extra-category li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
}

/* Semester Cards */
.semester-card {
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    margin-bottom: 2.5rem;
    overflow: hidden;
    position: relative;
}

.semester-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(39, 174, 96, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.semester-header {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2980b9 100%);
    color: var(--white);
    padding: 1.5rem 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.semester-header h2 {
    margin: 0;
    border: none;
    color: var(--white);
    flex: 1;
    min-width: 200px;
}

.semester-badge {
    background-color: rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    white-space: nowrap;
    font-weight: 500;
}

.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
}

.subject-group h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.semester-total {
    background-color: var(--light-bg);
    padding: 1rem 2rem;
    text-align: center;
    font-size: 1.1rem;
}

.semester-note {
    padding: 0 2rem 1.5rem;
    color: var(--text-light);
    font-style: italic;
}

/* Target Kelulusan Card */
.semester-card .info-card {
    margin: 0;
    border-radius: 0;
    box-shadow: none;
}

.semester-card .info-card h3 {
    color: var(--secondary-color);
    margin-top: 0;
    margin-bottom: 1rem;
    border-bottom: 2px solid rgba(52, 152, 219, 0.3);
    padding-bottom: 0.5rem;
}

.semester-card .info-card p {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.semester-card .info-card .mission-list li {
    color: var(--text-dark);
}

/* Registration Form */
.registration-form-container {
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

.registration-form h3 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary-color);
}

.registration-form h3:first-child {
    margin-top: 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.form-group small {
    display: block;
    margin-top: 0.3rem;
    color: var(--text-light);
    font-size: 0.85rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.required {
    color: var(--accent-color);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-top: 0.3rem;
}

.checkbox-group label {
    margin-bottom: 0;
}

.link {
    color: var(--secondary-color);
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.form-message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 5px;
    display: none;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Steps Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.step-item {
    text-align: center;
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2980b9 100%);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

.step-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* CTA Section */
.cta-section {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2980b9 100%);
    border-radius: 10px;
    color: var(--white);
}

.cta-section h2 {
    color: var(--white);
    margin-bottom: 1rem;
}

.cta-section p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Schedule Section */
.schedule-section {
    background-color: var(--light-bg);
    padding: 4rem 0;
}

.schedule-section h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 3rem;
    font-size: 2rem;
}

.schedule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.schedule-item {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    border-left: 4px solid var(--secondary-color);
}

.schedule-item h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.schedule-item p {
    margin: 0.5rem 0;
    line-height: 1.6;
}

.schedule-item p strong {
    color: var(--secondary-color);
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1' opacity='0.06'%3E%3Cpath d='M50 10 Q30 25 30 45 Q30 60 50 70 Q70 60 70 45 Q70 25 50 10 Z'/%3E%3Cpath d='M50 0 L50 10 M45 10 L50 15 L55 10'/%3E%3Ccircle cx='50' cy='45' r='15'/%3E%3Cpath d='M35 45 Q35 55 50 60 Q65 55 65 45'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 100px 100px;
    opacity: 0.3;
    pointer-events: none;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--white);
}

.footer-section p {
    margin: 0.5rem 0;
    opacity: 0.9;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar .container {
        flex-wrap: wrap;
    }

    .menu-toggle {
        display: flex;
        order: 3;
    }

    .logo {
        flex: 1;
    }

    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0;
        margin-top: 1rem;
        background-color: var(--primary-color);
        border-radius: 8px;
        overflow: hidden;
        order: 4;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-menu a {
        display: block;
        padding: 1rem 1.5rem;
        border-radius: 0;
    }

    .nav-menu a:hover,
    .nav-menu a.active {
        background-color: var(--secondary-color);
    }

    .hero {
        padding: 4rem 1.5rem;
    }

    .hero-content h2 {
        font-size: 1.8rem;
    }

    .page-header {
        padding: 3rem 1.5rem;
    }

    .page-header h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }

    .page-header p {
        font-size: 1rem;
        margin-top: 0.5rem;
    }

    .feature-grid,
    .facilities-grid,
    .extracurricular-grid,
    .scholarship-grid,
    .assessment-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .subjects-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .schedule-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .semester-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .semester-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem 1.5rem;
        gap: 0.75rem;
    }

    .semester-header h2 {
        font-size: 1.3rem;
        line-height: 1.3;
    }

    .semester-badge {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
        width: 100%;
        text-align: center;
    }

    .subjects-grid {
        padding: 1rem;
        gap: 1.5rem;
    }

    .subject-group h3 {
        font-size: 1rem;
    }

    .semester-total {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }

    .semester-note {
        padding: 0 1rem 1rem;
        font-size: 0.9rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .form-actions button {
        width: 100%;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .info-card {
        padding: 1.5rem;
    }

    .info-card h2,
    .info-card h3 {
        font-size: 1.3rem;
        line-height: 1.4;
        word-wrap: break-word;
    }

    .info-card h4 {
        font-size: 1.1rem;
    }

    .fee-table {
        font-size: 0.9rem;
    }

    .fee-table th,
    .fee-table td {
        padding: 0.75rem 0.5rem;
    }
}

/* Tablet Design */
@media (min-width: 769px) and (max-width: 1024px) {
    .feature-grid,
    .facilities-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .schedule-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Print Styles */
@media print {
    header,
    footer,
    .btn,
    .form-actions {
        display: none;
    }

    .info-card {
        break-inside: avoid;
    }
}
