/* PSY-Mom Premium Design System Stylesheet */

:root {
    --primary: #ec4899;           /* Soothing Rose Pink */
    --primary-hover: #db2777;     /* Darker pink for hover */
    --primary-light: #fbcfe8;     /* Very soft pink */
    --secondary: #60a5fa;         /* Calming Sky Blue */
    --secondary-hover: #3b82f6;   /* Darker blue for hover */
    --secondary-light: #dbeafe;   /* Soft blue */
    --accent: #10b981;            /* Calm Sage Green (Success) */
    --accent-light: #d1fae5;
    --warning: #f59e0b;           /* Warm Amber (Warning) */
    --warning-light: #fef3c7;
    --danger: #ef4444;            /* Soft Coral Red (Referral) */
    --danger-light: #fee2e2;
    
    --bg-main: #fdfafb;           /* Warm light cream-pink background */
    --text-main: #1f2937;         /* Elegant charcoal */
    --text-muted: #6b7280;        /* Subtle slate gray */
    --border-color: rgba(236, 72, 153, 0.1); /* Soft pinkish border */
    
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 25px -5px rgba(236, 72, 153, 0.08), 0 8px 10px -6px rgba(236, 72, 153, 0.04);
    --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.05), 0 10px 15px -3px rgba(0, 0, 0, 0.03);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #fdf8f9 0%, #f0f4ff 100%);
    background-attachment: fixed;
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    min-height: 100vh;
}

/* Container & Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

header {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 1.5rem;
    padding: 1rem 2rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    animation: fadeInDown 0.6s ease;
}

header .logo a {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, #db2777 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: var(--transition-smooth);
}

header .logo a:hover {
    opacity: 0.8;
}

.nav-link {
    font-size: 0.85rem;
    color: var(--primary) !important;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition-smooth);
    padding: 0.5rem 1rem;
    border-radius: 0.8rem;
}

.nav-link:hover {
    background-color: var(--primary-light);
    color: var(--primary-hover) !important;
}

.nav-logout {
    color: #ef4444 !important;
}

.nav-logout:hover {
    background-color: #fee2e2;
    color: #b91c1c !important;
}

.nav-login {
    background-color: var(--primary-light);
    color: var(--primary-hover) !important;
}

.nav-login:hover {
    background-color: var(--primary);
    color: white !important;
}

main {
    animation: fadeIn 0.8s ease;
}

footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 2rem;
    margin-top: 4rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Card Styles */
.card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 2rem;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: var(--transition-smooth);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

/* Narrow Card for Forms */
.card-narrow {
    max-width: 550px;
    margin: 0 auto 2rem auto;
}

/* Typography */
h1, h2, h3, h4 {
    color: var(--text-main);
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-top: 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.9rem 1.8rem;
    border-radius: 1.2rem;
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #db2777 100%);
    color: white !important;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(236, 72, 153, 0.25);
    filter: brightness(1.05);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary) 0%, #2563eb 100%);
    color: white !important;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(96, 165, 250, 0.25);
    filter: brightness(1.05);
}

.btn-light {
    background: white;
    color: var(--text-main);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.btn-light:hover {
    background: var(--primary-light);
    color: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-white {
    background: white;
    color: var(--primary) !important;
}

.btn-white:hover {
    background: #fff;
    color: var(--primary-hover) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.3);
}

/* Form Styling */
label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-main);
}

input[type="text"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 0.9rem 1.2rem;
    border-radius: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-main);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition-smooth);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.01);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.15), inset 0 2px 4px rgba(0,0,0,0.01);
    background: white;
}

small {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: block;
}

/* Landing Page Elements */
.hero {
    padding: 7rem 2rem;
    text-align: center;
    background: radial-gradient(circle at top right, rgba(236, 72, 153, 0.08), transparent 40%),
                radial-gradient(circle at bottom left, rgba(96, 165, 250, 0.08), transparent 40%),
                linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(245, 247, 255, 0.9) 100%);
    backdrop-filter: blur(10px);
    margin: -24px -24px 4rem -24px;
    border-radius: 0 0 3.5rem 3.5rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-top: none;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.hero h1 span {
    background: linear-gradient(135deg, var(--primary) 0%, #db2777 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto 3rem;
}

.section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

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

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-radius: 2.5rem;
    padding: 3rem 2.5rem;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition-smooth);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(236, 72, 153, 0.3);
}

.feature-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    filter: drop-shadow(0 10px 15px rgba(236, 72, 153, 0.15));
    animation: float 4s ease-in-out infinite;
}

.feature-card:nth-child(2) .feature-icon {
    animation-delay: 1.3s;
}

.feature-card:nth-child(3) .feature-icon {
    animation-delay: 2.6s;
}

/* Steps Progress */
.step-card {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.step-card:hover {
    transform: translateX(5px);
    border-color: rgba(96, 165, 250, 0.2);
    box-shadow: var(--shadow-md);
}

.step-number {
    background: linear-gradient(135deg, var(--primary) 0%, #db2777 100%);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.4rem;
    flex-shrink: 0;
    box-shadow: 0 8px 16px rgba(236, 72, 153, 0.2);
}

.step-card:nth-child(even) .step-number {
    background: linear-gradient(135deg, var(--secondary) 0%, #2563eb 100%);
    box-shadow: 0 8px 16px rgba(96, 165, 250, 0.2);
}

/* CTA Banner */
.cta-banner {
    background: linear-gradient(135deg, var(--primary) 0%, #b5179e 50%, #4cc9f0 100%);
    color: white;
    padding: 5rem 3rem;
    border-radius: 3rem;
    text-align: center;
    margin: 5rem 0;
    box-shadow: 0 20px 50px rgba(236, 72, 153, 0.3);
    position: relative;
    overflow: hidden;
}

.cta-banner::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    top: -100px;
    right: -100px;
    pointer-events: none;
}

.cta-banner h2 {
    color: white;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.cta-banner p {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    opacity: 0.9;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Questionnaire Progress Bar */
.progress-bar {
    width: 100%;
    height: 12px;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, #db2777 100%);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.5);
}

/* Category Alert Colors (Results & Badges) */
.cat-normal {
    background-color: var(--accent-light) !important;
    color: #065f46 !important;
    border: 1px solid rgba(16, 185, 129, 0.2) !important;
}

.cat-waspada {
    background-color: var(--warning-light) !important;
    color: #92400e !important;
    border: 1px solid rgba(245, 158, 11, 0.2) !important;
}

.cat-rujuk {
    background-color: var(--danger-light) !important;
    color: #991b1b !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
}

/* Questionnaire Options (Radio labels) */
.question-option {
    display: flex;
    align-items: center;
    padding: 1.2rem 1.5rem !important;
    border-radius: 1.2rem;
    background-color: white !important;
    border: 1.5px solid rgba(0, 0, 0, 0.06) !important;
    color: var(--text-main) !important;
    text-align: left !important;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
    margin-bottom: 0.2rem;
}

.question-option:hover {
    background-color: var(--primary-light) !important;
    border-color: var(--primary) !important;
    transform: translateY(-2px);
    color: var(--primary-hover) !important;
}

.question-option input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 0, 0, 0.15);
    border-radius: 50%;
    outline: none;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    background: white;
}

.question-option input[type="radio"]:checked {
    border-color: var(--primary);
    background: var(--primary);
}

.question-option input[type="radio"]:checked::before {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    display: block;
}

/* Pagination Styling */
.pagination {
    display: flex;
    flex-direction: row;
    list-style: none;
    padding: 0;
    gap: 0.5rem;
    margin: 0;
}

.pagination li a,
.pagination li span {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border-radius: 0.8rem;
    background: rgba(255,255,255,0.7);
    border: 1px solid rgba(0,0,0,0.05);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    transition: var(--transition-smooth);
}

.pagination li.active span {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination li a:hover {
    background: var(--primary-light);
    color: var(--primary-hover);
    border-color: var(--primary-light);
}

/* Grid helper for details & dashboards */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .hero h1 {
        font-size: 2.2rem;
    }
    header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    nav {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0px); }
}
