/* In Every Name - Name Meanings, Origins & Baby Naming Guide
   Theme: Warm, meaningful, timeless
   Colors: dusty rose (#c9a9a6), sage (#9caf88), cream (#faf8f5), charcoal (#2d3436)
*/

/* CSS Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --dusty-rose: #c9a9a6;
    --dusty-rose-light: #d4bbb8;
    --sage: #9caf88;
    --sage-light: #b5c4a5;
    --cream: #faf8f5;
    --cream-dark: #f5f0eb;
    --charcoal: #2d3436;
    --charcoal-light: #636e72;
    --white: #ffffff;
    --shadow: rgba(45, 52, 54, 0.1);
    --shadow-strong: rgba(45, 52, 54, 0.15);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 18px;
    line-height: 1.7;
    color: var(--charcoal);
    background-color: var(--cream);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Georgia', serif;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--charcoal);
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.3rem; }

p {
    margin-bottom: 1.5rem;
}

a {
    color: var(--dusty-rose);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--sage);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
header {
    background: var(--white);
    box-shadow: 0 2px 20px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-family: 'Georgia', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--charcoal);
}

.logo span {
    color: var(--dusty-rose);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

nav a {
    font-family: 'Georgia', serif;
    font-size: 1rem;
    color: var(--charcoal);
    font-weight: 500;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--sage);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

nav a:hover {
    color: var(--charcoal);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--charcoal);
    margin: 5px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--cream) 0%, var(--cream-dark) 100%);
    padding: 5rem 2rem;
    text-align: center;
}

.hero h1 {
    font-size: 3.2rem;
    margin-bottom: 1.5rem;
    color: var(--charcoal);
}

.hero p {
    font-size: 1.3rem;
    color: var(--charcoal-light);
    max-width: 700px;
    margin: 0 auto 2rem;
}

.hero-categories {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.category-tag {
    background: var(--white);
    color: var(--charcoal);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-size: 0.95rem;
    box-shadow: 0 2px 10px var(--shadow);
    transition: all 0.3s ease;
}

.category-tag:hover {
    background: var(--sage);
    color: var(--white);
    transform: translateY(-2px);
}

/* Featured Articles */
.featured-section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

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

.section-title h2 {
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--sage);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.article-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.article-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.article-card-content {
    padding: 1.8rem;
}

.article-card-meta {
    font-size: 0.85rem;
    color: var(--charcoal-light);
    margin-bottom: 0.8rem;
    font-family: 'Arial', sans-serif;
}

.article-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.article-card h3 a {
    color: var(--charcoal);
}

.article-card h3 a:hover {
    color: var(--dusty-rose);
}

.article-card p {
    font-size: 1rem;
    color: var(--charcoal-light);
    margin-bottom: 1.2rem;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--dusty-rose);
    font-weight: 600;
    font-family: 'Arial', sans-serif;
    font-size: 0.95rem;
}

.read-more:hover {
    color: var(--sage);
}

/* Article Page */
.article-header {
    padding: 3rem 2rem;
    background: var(--white);
    text-align: center;
    border-bottom: 1px solid var(--cream-dark);
}

.article-header h1 {
    font-size: 2.6rem;
    max-width: 900px;
    margin: 0 auto 1rem;
}

.article-meta {
    color: var(--charcoal-light);
    font-family: 'Arial', sans-serif;
    font-size: 0.95rem;
}

.article-meta span {
    margin: 0 0.5rem;
}

.article-featured-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

.article-content {
    padding: 3rem 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.article-content h2 {
    margin-top: 2.5rem;
    color: var(--charcoal);
    border-bottom: 2px solid var(--sage);
    padding-bottom: 0.5rem;
}

.article-content h3 {
    color: var(--charcoal);
    margin-top: 2rem;
}

.article-content p {
    font-size: 1.1rem;
    line-height: 1.9;
}

.article-content ul, .article-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.article-content blockquote {
    border-left: 4px solid var(--sage);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    background: var(--cream);
    font-style: italic;
    font-size: 1.2rem;
    color: var(--charcoal);
}

/* Author Box */
.author-box {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 3rem;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    box-shadow: 0 2px 15px var(--shadow);
}

.author-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--sage);
}

.author-info h4 {
    margin-bottom: 0.3rem;
    font-size: 1.2rem;
}

.author-info p {
    color: var(--charcoal-light);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* Related Posts */
.related-posts {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--cream-dark);
}

.related-posts h3 {
    margin-bottom: 1.5rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.related-card {
    background: var(--cream);
    padding: 1.2rem;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.related-card:hover {
    transform: translateY(-3px);
}

.related-card h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.related-card h4 a {
    color: var(--charcoal);
}

.related-card h4 a:hover {
    color: var(--dusty-rose);
}

.related-card p {
    font-size: 0.85rem;
    color: var(--charcoal-light);
    margin-bottom: 0;
}

/* Newsletter */
.newsletter {
    background: linear-gradient(135deg, var(--sage) 0%, var(--sage-light) 100%);
    padding: 4rem 2rem;
    text-align: center;
    margin: 3rem 0;
}

.newsletter h2 {
    color: var(--white);
    margin-bottom: 1rem;
}

.newsletter p {
    color: var(--white);
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.newsletter-form {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.newsletter-form input {
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    width: 300px;
    font-family: inherit;
}

.newsletter-form button {
    background: var(--charcoal);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
    font-family: inherit;
}

.newsletter-form button:hover {
    background: var(--dusty-rose);
}

/* Footer */
footer {
    background: var(--charcoal);
    color: var(--cream);
    padding: 4rem 2rem 2rem;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.footer-section h4 {
    color: var(--dusty-rose);
    margin-bottom: 1.2rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.8rem;
}

.footer-section a {
    color: var(--cream);
    opacity: 0.8;
}

.footer-section a:hover {
    opacity: 1;
    color: var(--sage);
}

.footer-bottom {
    max-width: 1200px;
    margin: 3rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Page Header */
.page-header {
    background: var(--cream-dark);
    padding: 3rem 2rem;
    text-align: center;
}

.page-header h1 {
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--charcoal-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-family: 'Arial', sans-serif;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--cream-dark);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--white);
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--sage);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Arial', sans-serif;
    border: none;
}

.btn-primary {
    background: var(--dusty-rose);
    color: var(--white);
}

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

.btn-secondary {
    background: var(--sage);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--charcoal);
}

/* Search */
.search-bar {
    max-width: 600px;
    margin: 2rem auto;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 1.2rem 1.5rem;
    padding-right: 3.5rem;
    border: 2px solid var(--cream-dark);
    border-radius: 50px;
    font-size: 1rem;
    font-family: inherit;
}

.search-bar button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--sage);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-bar button:hover {
    background: var(--dusty-rose);
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    font-family: 'Arial', sans-serif;
    font-size: 0.9rem;
    color: var(--charcoal-light);
}

.breadcrumbs a {
    color: var(--charcoal-light);
}

.breadcrumbs a:hover {
    color: var(--dusty-rose);
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.tag {
    background: var(--cream);
    color: var(--charcoal);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-family: 'Arial', sans-serif;
}

.tag:hover {
    background: var(--sage);
    color: var(--white);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--cream-dark);
}

th {
    background: var(--sage);
    color: var(--white);
    font-weight: 600;
}

tr:nth-child(even) {
    background: var(--cream);
}

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.4rem; }
    
    .header-inner {
        flex-wrap: wrap;
    }
    
    nav {
        display: none;
        width: 100%;
        padding-top: 1rem;
    }
    
    nav.active {
        display: block;
    }
    
    nav ul {
        flex-direction: column;
        gap: 1rem;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .hero h1 {
        font-size: 2.4rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .author-box {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .newsletter-form {
        flex-direction: column;
        align-items: center;
    }
    
    .newsletter-form input {
        width: 100%;
        max-width: 300px;
    }
}

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

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-sage { color: var(--sage); }
.text-rose { color: var(--dusty-rose); }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

/* Loading Spinner */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--cream);
    border-top-color: var(--sage);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
