/* CSS Design System for Pregnazone Educational Portal */
:root {
    --primary: #ff6b8b;
    --primary-hover: #ff476f;
    --primary-light: #ffe3e8;
    --secondary: #8a73ff;
    --secondary-light: #f0ebff;
    --text-main: #2d2a36;
    --text-muted: #6b667a;
    --bg-body: #fcfaff;
    --white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.4);
    --shadow: 0 10px 30px rgba(255, 107, 139, 0.06);
    --shadow-hover: 0 15px 35px rgba(255, 107, 139, 0.12);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Header & Navbar */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--text-main);
    text-decoration: none;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 24px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: var(--transition);
}

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

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #ffeef1 0%, #f1ebff 100%);
    padding: 80px 24px;
    text-align: center;
    border-bottom-left-radius: 40px;
    border-bottom-right-radius: 40px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--text-main);
    line-height: 1.3;
    margin-bottom: 16px;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

/* Search bar styling */
.search-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 16px 50px 16px 24px;
    border: 1.5px solid rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    font-size: 1rem;
    outline: none;
    background: var(--white);
    box-shadow: 0 10px 25px rgba(255, 107, 139, 0.05);
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 15px 30px rgba(255, 107, 139, 0.1);
}

.search-icon {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* Main Layout */
main {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 24px;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.breadcrumbs span {
    cursor: pointer;
    transition: var(--transition);
}

.breadcrumbs span:hover {
    color: var(--primary);
}

.breadcrumbs .separator {
    color: #ccc;
    pointer-events: none;
}

/* Grid Layouts */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    animation: fadeIn 0.4s ease;
}

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

/* Premium Cards */
.card {
    background: var(--white);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.02);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

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

.card-img-container {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
}

.card-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.card:hover .card-img-container img {
    transform: scale(1.08);
}

.card-body {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card-body h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
}

.card-body p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Article Page Container */
.article-container {
    background: var(--white);
    border-radius: 32px;
    padding: 40px;
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
    animation: fadeIn 0.4s ease;
}

.article-header-img {
    width: 100%;
    height: 380px;
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 32px;
    box-shadow: var(--shadow);
}

.article-header-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-title {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--text-main);
    line-height: 1.4;
    margin-bottom: 24px;
}

.article-body {
    font-size: 1.1rem;
    color: #4a455a;
    line-height: 1.8;
    text-align: justify;
    white-space: pre-line;
}

.tip-box {
    background: #fff5f6;
    border-right: 5px solid var(--primary);
    border-radius: 16px;
    padding: 24px;
    margin-top: 32px;
}

.tip-box h4 {
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tip-box p {
    font-size: 0.95rem;
    color: #5c4c50;
    line-height: 1.6;
}

/* Footer */
footer {
    background: var(--text-main);
    color: #fff;
    text-align: center;
    padding: 40px 24px;
    margin-top: 80px;
}

footer p {
    color: #9a95aa;
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .article-container {
        padding: 20px;
    }
    
    .article-header-img {
        height: 220px;
    }
    
    .article-title {
        font-size: 1.6rem;
    }
}
