/*
 Theme Name:   RPH365 Portal
 Theme URI:    https://rph365.com
 Description:  Tema portal pendidikan RPH365 untuk guru-guru Malaysia
 Author:       RPH365
 Template:     generatepress
 Version:      1.0.0
 Text Domain:  rph365
*/

/* ===== Reset for front page ===== */
body.home {
    margin: 0;
    padding: 0;
}

/* ===== Header / Navigation ===== */
.rph-header {
    background: var(--rph-white);
    border-bottom: 1px solid #e5e7eb;
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.rph-nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rph-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--rph-primary);
    text-decoration: none;
}

.rph-logo:hover {
    color: var(--rph-primary-dark);
}

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

.rph-nav a {
    color: var(--rph-text-light);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

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

.rph-mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--rph-text);
    padding: 4px;
}

/* ===== Global ===== */
:root {
    --rph-primary: #1e40af;
    --rph-primary-dark: #1e3a8a;
    --rph-secondary: #f59e0b;
    --rph-text: #1f2937;
    --rph-text-light: #6b7280;
    --rph-bg-light: #f8fafc;
    --rph-white: #ffffff;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--rph-text);
}

/* ===== Hero Section ===== */
.rph-hero {
    background: linear-gradient(135deg, var(--rph-primary) 0%, var(--rph-primary-dark) 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.rph-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 16px;
    color: white;
}

.rph-hero .rph-tagline {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

.rph-hero .rph-badge {
    display: inline-block;
    background: var(--rph-secondary);
    color: var(--rph-text);
    padding: 6px 16px;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.rph-btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s;
    margin: 0 8px;
}

.rph-btn-primary {
    background: var(--rph-secondary);
    color: var(--rph-text);
}

.rph-btn-primary:hover {
    background: #d97706;
    color: var(--rph-text);
    transform: translateY(-2px);
}

.rph-btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.rph-btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: white;
}

/* ===== Container ===== */
.rph-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Features Section ===== */
.rph-features {
    padding: 80px 0;
    background: var(--rph-bg-light);
}

.rph-section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--rph-text);
}

.rph-section-subtitle {
    text-align: center;
    color: var(--rph-text-light);
    font-size: 1.1rem;
    margin-bottom: 48px;
}

.rph-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.rph-feature-card {
    background: var(--rph-white);
    padding: 32px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.rph-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.rph-feature-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--rph-primary), #3b82f6);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
}

.rph-feature-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.rph-feature-card p {
    color: var(--rph-text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ===== Blog Section ===== */
.rph-blog {
    padding: 80px 0;
}

.rph-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.rph-blog-card {
    background: var(--rph-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.rph-blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.rph-blog-thumb {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
}

.rph-blog-content {
    padding: 24px;
}

.rph-blog-category {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--rph-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.rph-blog-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 8px 0;
    line-height: 1.4;
}

.rph-blog-card h3 a {
    color: var(--rph-text);
    text-decoration: none;
}

.rph-blog-card h3 a:hover {
    color: var(--rph-primary);
}

.rph-blog-excerpt {
    color: var(--rph-text-light);
    font-size: 0.9rem;
    line-height: 1.6;
}

.rph-blog-more {
    text-align: center;
    margin-top: 40px;
}

/* ===== CTA Section ===== */
.rph-cta {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--rph-primary) 0%, var(--rph-primary-dark) 100%);
    color: white;
    text-align: center;
}

.rph-cta h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: white;
}

.rph-cta p {
    opacity: 0.9;
    font-size: 1.1rem;
    margin-bottom: 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== Footer ===== */
.rph-footer {
    background: #111827;
    color: #9ca3af;
    padding: 40px 0;
    text-align: center;
    font-size: 0.9rem;
}

.rph-footer a {
    color: #d1d5db;
    text-decoration: none;
}

.rph-footer a:hover {
    color: white;
}

/* ===== WP Admin Bar Fix ===== */
body.admin-bar .rph-header {
    top: 32px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .rph-hero h1 {
        font-size: 2rem;
    }

    .rph-hero .rph-tagline {
        font-size: 1rem;
    }

    .rph-features-grid,
    .rph-blog-grid {
        grid-template-columns: 1fr;
    }

    .rph-btn {
        display: block;
        margin: 8px 0;
    }

    .rph-hero-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .rph-hero {
        padding: 48px 0;
    }

    .rph-features,
    .rph-blog,
    .rph-cta {
        padding: 48px 0;
    }

    .rph-mobile-toggle {
        display: block;
    }

    .rph-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--rph-white);
        flex-direction: column;
        padding: 16px 20px;
        gap: 16px;
        border-bottom: 1px solid #e5e7eb;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }

    .rph-nav.rph-nav-open {
        display: flex;
    }

    body.admin-bar .rph-header {
        top: 46px;
    }
}
