/* Premium Professional Blog Design System */
:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary: #64748b;
    --accent: #10b981;
    --accent-dark: #059669;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    --font-display: 'Inter', var(--font-sans);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    line-height: 1.75;
    background: var(--bg-primary);
    font-size: 18px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
}

/* Premium Header */
.site-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.site-header.nav-transparent {
    background: transparent;
    backdrop-filter: none;
    border-bottom: none;
    box-shadow: none;
    position: absolute;
    width: 100%;
}

.site-header.nav-transparent.sticky {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    position: fixed;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.site-logo {
    display: flex;
    align-items: center;
    height: 60px; /* Fixed height for logo container - prevents header expansion */
    max-height: 60px;
    flex-shrink: 0;
}

.site-logo a {
    display: flex;
    align-items: center;
    height: 100%;
}

.site-logo img {
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    transition: var(--transition);
}

.site-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin: 0;
}

.site-title a {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: var(--transition);
}

.main-nav {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.main-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    position: relative;
    padding: 0.5rem 0;
    transition: var(--transition);
}

.main-nav a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-nav a:hover {
    color: var(--primary);
}

.main-nav a:hover::before {
    width: 100%;
}

/* Mobile Menu Toggle - Hidden on Desktop */
.mobile-menu-toggle {
    display: none;
}

/* Navigation Search */
.nav-search {
    position: relative;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.search-input {
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
    width: 200px;
    transition: var(--transition);
    outline: none;
}

.search-input:focus {
    width: 250px;
    border-color: var(--primary);
    background: var(--bg-secondary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-button {
    position: absolute;
    right: 0.5rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border-radius: var(--radius-sm);
}

.search-button:hover {
    color: var(--primary);
    background: var(--bg-secondary);
}

.search-button:active {
    transform: scale(0.95);
}

.language-switcher select {
    padding: 0.5rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.language-switcher select:hover {
    border-color: var(--primary);
    background: var(--bg-secondary);
}

/* Premium Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10rem 0 8rem;
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.5rem;
    opacity: 0.95;
    margin-bottom: 3rem;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

.hero .container {
    text-align: inherit; /* Will be overridden by inline style */
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255,255,255,0.1) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.hero .container {
    position: relative;
    z-index: 2;
}

/* Hero Search Bar */
.hero-search-container {
    max-width: 700px;
    margin: 3rem auto 0;
    position: relative;
    z-index: 3;
}

.hero-search-form {
    width: 100%;
}

.hero-search-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 60px;
    padding: 8px 8px 8px 24px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.hero-search-wrapper:hover {
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
    transform: translateY(-2px);
}

.hero-search-wrapper:focus-within {
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.4),
        0 0 0 3px rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.hero-search-icon {
    width: 24px;
    height: 24px;
    color: #667eea;
    flex-shrink: 0;
    margin-right: 12px;
}

.hero-search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1.125rem;
    color: #333;
    padding: 14px 16px;
    outline: none;
    font-weight: 500;
}

.hero-search-input::placeholder {
    color: #999;
    font-weight: 400;
}

.hero-search-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    flex-shrink: 0;
}

.hero-search-btn:hover {
    transform: translateX(3px);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.5);
}

.hero-search-btn:active {
    transform: translateX(3px) scale(0.98);
}

.hero-search-btn-text {
    font-size: 1rem;
}

.hero-search-btn-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.hero-search-btn:hover .hero-search-btn-icon {
    transform: translateX(3px);
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    text-shadow: 0 4px 20px rgba(0,0,0,0.2);
    animation: fadeInUp 0.8s ease-out;
}

.hero p {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    opacity: 0.95;
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    font-weight: 400;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Premium Post Cards */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 2rem;
    margin: 4rem 0;
}

.post-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-card:hover::before {
    transform: scaleX(1);
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.post-image {
    width: 100%;
    height: 240px;
    overflow: hidden;
    position: relative;
    background: var(--bg-tertiary);
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-card:hover .post-image img {
    transform: scale(1.08);
}

.post-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-content h3 {
    margin-bottom: 0.875rem;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.post-content h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    display: block;
}

.post-content h3 a:hover {
    color: var(--primary);
}

.post-excerpt {
    color: var(--text-secondary);
    margin: 1rem 0;
    line-height: 1.7;
    flex: 1;
    font-size: 0.9375rem;
}

.post-meta {
    display: flex;
    gap: 1.25rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
    font-weight: 500;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.post-meta .category {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.post-meta .category:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Premium Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    text-decoration: none;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.01em;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::after {
    width: 400px;
    height: 400px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.btn-secondary {
    background: var(--secondary);
}

/* Premium Post List */
.posts-list {
    margin: 4rem 0;
}

/* Recent Posts Section - Grid Layout */
.recent-posts {
    margin-top: 6rem;
    padding-top: 4rem;
}

.post-item {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2.5rem;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    background: var(--bg-primary);
    border: 1px solid var(--border);
    margin-bottom: 2rem;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.post-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-item:hover::before {
    transform: scaleY(1);
}

.post-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateX(8px);
    border-color: var(--primary);
}

.post-thumbnail {
    flex-shrink: 0;
    width: 100%;
    height: 220px;
    overflow: hidden;
    border-radius: var(--radius);
    position: relative;
    background: var(--bg-tertiary);
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-item:hover .post-thumbnail img {
    transform: scale(1.1);
}

.post-details {
    display: flex;
    flex-direction: column;
}

.post-details h3 {
    margin-bottom: 1rem;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.post-details h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.post-details h3 a:hover {
    color: var(--primary);
}

.post-details .post-excerpt {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 1rem 0;
}

@media (max-width: 968px) {
    .post-item {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .post-thumbnail {
        height: 240px;
    }
}

/* Premium Single Post */
.single-post {
    padding: 4rem 0;
    max-width: 840px;
    margin: 0 auto;
}

.post-header {
    margin-bottom: 4rem;
    text-align: center;
    padding-bottom: 3rem;
    border-bottom: 2px solid var(--border);
    position: relative;
}

.post-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.post-header h1 {
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    margin-bottom: 2rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.post-header .post-meta {
    justify-content: center;
    margin-top: 2rem;
    font-size: 0.9375rem;
    gap: 1.5rem;
}

.post-featured-image {
    margin: 2rem 0;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-2xl);
    position: relative;
    max-width: 100%;
    display: flex;
    justify-content: center;
}

.post-featured-image img {
    width: 100%;
    max-width: 800px;
    height: auto;
    max-height: 500px;
    display: block;
    object-fit: cover;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .post-featured-image {
        margin: 1.5rem 0;
    }
    
    .post-featured-image img {
        max-height: 300px;
    }
}

.post-content {
    margin: 4rem 0;
}

.post-body {
    font-size: 1.125rem;
    line-height: 1.85;
    color: var(--text-primary);
    margin: 3rem 0;
}

.post-body h2 {
    font-size: 2.25rem;
    margin: 3.5rem 0 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    letter-spacing: -0.02em;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--border);
    position: relative;
}

.post-body h2::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.post-body h3 {
    font-size: 1.75rem;
    margin: 3rem 0 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.post-body p {
    margin-bottom: 1.875rem;
    color: var(--text-primary);
}

.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    margin: 3rem 0;
    box-shadow: var(--shadow-lg);
}

.post-body a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    font-weight: 500;
}

.post-body a:hover {
    border-bottom-color: var(--primary);
    color: var(--primary-dark);
}

.post-body ul, .post-body ol {
    margin: 2rem 0;
    padding-left: 2.5rem;
}

.post-body li {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.post-body blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 2rem;
    margin: 3rem 0;
    font-style: italic;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--radius);
    font-size: 1.25rem;
    line-height: 1.7;
    position: relative;
}

.post-body blockquote::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 1rem;
    font-size: 4rem;
    color: var(--primary);
    opacity: 0.2;
    font-family: Georgia, serif;
}

.post-body code {
    background: var(--bg-tertiary);
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-sm);
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--primary-dark);
    border: 1px solid var(--border);
}

.post-body pre {
    background: var(--bg-tertiary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    overflow-x: auto;
    margin: 3rem 0;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.post-body pre code {
    background: transparent;
    padding: 0;
    border: none;
    color: var(--text-primary);
}

/* Reading Progress */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    z-index: 9999;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.5);
}

/* Premium Social Share */
.social-share {
    display: flex;
    gap: 1rem;
    margin: 4rem 0;
    padding: 2.5rem;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border-radius: var(--radius-xl);
    justify-content: center;
    flex-wrap: wrap;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.social-share > span {
    width: 100%;
    text-align: center;
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.125rem;
    letter-spacing: -0.01em;
}

.social-share a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.25rem;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.social-share a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.social-share a:hover::before {
    width: 400px;
    height: 400px;
}

.social-share a:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: var(--shadow-xl);
}

.social-share a span {
    position: relative;
    z-index: 1;
}

.social-share .facebook { background: linear-gradient(135deg, #1877f2, #42a5f5); }
.social-share .twitter { background: linear-gradient(135deg, #1da1f2, #64b5f6); }
.social-share .linkedin { background: linear-gradient(135deg, #0077b5, #0288d1); }
.social-share .whatsapp { background: linear-gradient(135deg, #25d366, #4caf50); }
.social-share .email { background: linear-gradient(135deg, var(--primary), var(--accent)); }

/* Related Posts */
.related-posts {
    margin: 5rem 0;
    padding: 4rem 0;
    border-top: 2px solid var(--border);
}

.related-posts h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    font-weight: 700;
    text-align: center;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

/* Categories */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin: 4rem 0;
}

.category-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    padding: 3rem 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    transition: var(--transition);
}

.category-card:hover::before {
    top: -30%;
    right: -30%;
}

.category-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-2xl);
}

.category-card h3 {
    margin-bottom: 1rem;
    font-size: 1.75rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
    letter-spacing: -0.01em;
}

.category-card p {
    position: relative;
    z-index: 1;
    opacity: 0.95;
    font-size: 0.9375rem;
}

/* Newsletter */
.newsletter {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    padding: 4rem 3rem;
    text-align: center;
    border-radius: var(--radius-xl);
    margin: 4rem auto;
    box-shadow: var(--shadow-2xl);
    position: relative;
    overflow: hidden;
    max-width: 1200px;
    width: 100%;
}

.newsletter::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: float 15s ease-in-out infinite;
    pointer-events: none !important; /* Allow clicks to pass through */
    z-index: 1;
}

.newsletter .container {
    position: relative;
    z-index: 2;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

.newsletter-form {
    position: relative;
    z-index: 9999 !important; /* Ensure form is above ALL overlays */
    pointer-events: auto !important;
    display: flex;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-form input {
    position: relative;
    z-index: 10000 !important; /* Ensure input is clickable */
    cursor: text !important;
    pointer-events: auto !important;
    flex: 1;
    padding: 1.125rem 1.75rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
}

.newsletter-form button {
    position: relative;
    z-index: 10000 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    padding: 1.125rem 2.5rem;
    background: white;
    color: var(--primary);
    border: none;
    border-radius: var(--radius);
}

.newsletter h2 {
    font-size: 3rem;
    margin-bottom: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.newsletter p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 3;
}

.newsletter-form input {
    flex: 1;
    padding: 1.125rem 1.75rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    background: white;
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.newsletter-form input:focus {
    outline: none;
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.newsletter-form button {
    padding: 1.125rem 2.5rem;
    background: white;
    color: var(--primary);
    border: none;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    letter-spacing: 0.01em;
}

.newsletter-form button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-xl);
}

/* Section Headings */
section h2 {
    font-size: 3rem;
    margin-bottom: 3rem;
    font-weight: 800;
    text-align: center;
    position: relative;
    padding-bottom: 1.5rem;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.featured-posts {
    margin-top: 5rem;
    padding-top: 3rem;
}

.categories-section {
    margin-top: 5rem;
    padding-top: 3rem;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
}

/* Footer */
.site-footer {
    background: var(--bg-secondary);
    padding: 4rem 0;
    margin-top: 6rem;
    text-align: center;
    color: var(--text-secondary);
    border-top: 1px solid var(--border);
}

/* Section Content */
.section-content {
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.85;
    font-size: 1.125rem;
    color: var(--text-primary);
}

.section-content p {
    margin-bottom: 1.5rem;
}

.section-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    margin: 2rem 0;
    box-shadow: var(--shadow-lg);
}

.about-section,
.services-section,
.contact-section {
    padding: 5rem 0;
    margin: 4rem 0;
}

.about-section:nth-child(even),
.services-section:nth-child(even),
.contact-section:nth-child(even) {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 5rem 2rem;
}

/* Custom Sections */
.custom-section {
    padding: 6rem 0;
    margin: 4rem 0;
}

.custom-section:nth-child(even) {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 6rem 2rem;
}

.custom-content {
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.85;
    font-size: 1.125rem;
    color: var(--text-primary);
}

.custom-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    margin: 2rem 0;
    box-shadow: var(--shadow-lg);
}

/* Responsive - Modern Mobile Design */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    body {
        font-size: 16px;
        line-height: 1.7;
    }
    
    .container {
        padding: 0 20px;
        max-width: 100%;
    }
    
    /* Header - Mobile Navigation */
    .site-header {
        padding: 1rem 0;
        position: sticky;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
        z-index: 1000;
    }
    
    .header-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
    }
    
    .site-logo {
        font-size: 1.25rem;
        font-weight: 700;
    }
    
    .main-nav {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 2rem 1.5rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        border-top: 1px solid var(--border);
        z-index: 999;
        animation: slideDown 0.3s ease-out;
    }
    
    .main-nav.active {
        display: flex;
    }
    
    .main-nav a {
        padding: 1rem 0;
        font-size: 1.1rem;
        border-bottom: 1px solid var(--border-light);
        width: 100%;
        text-align: left;
    }
    
    .main-nav a:last-child {
        border-bottom: none;
    }
    
    /* Mobile Search */
    .nav-search {
        width: 100%;
        margin: 1rem 0;
        padding: 0.5rem 0;
        border-top: 1px solid var(--border-light);
        border-bottom: 1px solid var(--border-light);
    }
    
    .search-form {
        width: 100%;
    }
    
    .search-input {
        width: 100% !important;
        padding: 0.75rem 3rem 0.75rem 1rem;
        font-size: 1rem;
        min-height: 44px;
    }
    
    .search-input:focus {
        width: 100% !important;
    }
    
    .search-button {
        right: 0.75rem;
        padding: 0.5rem;
        width: 36px;
        height: 36px;
    }
    
    .search-button svg {
        width: 20px;
        height: 20px;
    }
    
    /* Mobile Menu Toggle */
    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        padding: 0.5rem;
        z-index: 1001;
        background: transparent;
        border: none;
    }
    
    .mobile-menu-toggle span {
        width: 25px;
        height: 3px;
        background: var(--text-primary);
        border-radius: 3px;
        transition: var(--transition);
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Hero Section - Mobile */
    .hero {
        padding: 4rem 0 3rem;
        min-height: auto;
    }
    
    .hero h1 {
        font-size: 2.25rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    .hero p {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    .hero .btn {
        padding: 1rem 2rem;
        font-size: 1rem;
        min-height: 48px; /* Touch-friendly */
    }
    
    /* Hero Search Bar Mobile */
    .hero-search-container {
        max-width: 100%;
        margin: 2rem auto 0;
        padding: 0 1rem;
    }
    
    .hero-search-wrapper {
        flex-direction: column;
        padding: 16px;
        border-radius: 20px;
        gap: 12px;
    }
    
    .hero-search-icon {
        display: none;
    }
    
    .hero-search-input {
        width: 100%;
        font-size: 16px; /* Prevent iOS zoom */
        padding: 14px 16px;
        text-align: center;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.05);
    }
    
    .hero-search-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
        font-size: 1rem;
        border-radius: 12px;
        min-height: 48px;
    }
    
    .hero-search-btn-text {
        font-size: 1rem;
    }
    
    .hero-search-btn-icon {
        width: 18px;
        height: 18px;
    }
    
    /* Posts Grid - Mobile */
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-top: 2rem;
    }
    
    .post-card {
        border-radius: var(--radius-lg);
        overflow: hidden;
        box-shadow: var(--shadow-md);
        transition: var(--transition);
        background: white;
    }
    
    .post-card:active {
        transform: scale(0.98);
    }
    
    .post-image {
        height: 220px;
    }
    
    .post-content {
        padding: 1.5rem;
    }
    
    .post-content h3 {
        font-size: 1.5rem;
        line-height: 1.3;
        margin-bottom: 0.75rem;
    }
    
    .post-excerpt {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 1rem;
    }
    
    .post-meta {
        font-size: 0.875rem;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .post-card .btn {
        width: 100%;
        text-align: center;
        padding: 0.875rem 1.5rem;
        min-height: 48px;
        font-size: 1rem;
    }
    
    /* Featured Posts - Mobile */
    .featured-posts {
        margin-top: 3rem;
        padding-top: 2rem;
    }
    
    .featured-posts h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
        text-align: center;
    }
    
    /* Categories - Mobile */
    .categories-section {
        margin-top: 3rem;
        padding-top: 2rem;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .category-card {
        padding: 1.5rem;
        min-height: 120px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .category-card h3 {
        font-size: 1.5rem;
    }
    
    /* Newsletter - Mobile */
    .newsletter {
        padding: 3rem 1.5rem;
        margin: 3rem auto;
        max-width: 95%;
        border-radius: var(--radius-lg);
    }
    
    .newsletter h2 {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }
    
    .newsletter p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .newsletter-form {
        flex-direction: column;
        gap: 1rem;
        max-width: 100%;
    }
    
    .newsletter-form input {
        width: 100%;
        padding: 1rem 1.25rem;
        font-size: 1rem;
        min-height: 48px;
        border-radius: var(--radius);
    }
    
    .newsletter-form button {
        width: 100%;
        padding: 1rem 2rem;
        font-size: 1rem;
        min-height: 48px;
        border-radius: var(--radius);
    }
    
    /* Single Post - Mobile */
    .single-post {
        padding: 1rem 0 2rem;
    }
    
    .single-post .container {
        padding-top: 0.5rem;
    }
    
    .post-header {
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
        padding-top: 0;
    }
    
    .post-header h1 {
        font-size: 2rem;
        line-height: 1.3;
        margin-bottom: 1rem;
        margin-top: 0;
    }
    
    .post-meta {
        font-size: 0.875rem;
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .post-featured-image {
        margin: 1.5rem 0;
        border-radius: var(--radius);
    }
    
    .post-featured-image img {
        max-height: 250px;
        border-radius: var(--radius);
    }
    
    .post-body {
        font-size: 1rem;
        line-height: 1.8;
    }
    
    .post-body h2 {
        font-size: 1.75rem;
        margin-top: 2rem;
        margin-bottom: 1rem;
    }
    
    .post-body h3 {
        font-size: 1.5rem;
        margin-top: 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    .post-body p {
        margin-bottom: 1.25rem;
    }
    
    /* Section Headings - Mobile */
    section h2 {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
        text-align: center;
    }
    
    /* Recent Posts - Mobile */
    .recent-posts {
        margin-top: 3rem;
        padding-top: 2rem;
    }
    
    .recent-posts h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
        text-align: center;
    }
    
    /* Buttons - Mobile (Touch-friendly) */
    .btn {
        min-height: 48px;
        padding: 0.875rem 1.75rem;
        font-size: 1rem;
        border-radius: var(--radius);
        -webkit-tap-highlight-color: transparent;
    }
    
    .btn:active {
        transform: scale(0.97);
    }
    
    /* Social Share - Mobile */
    .social-share {
        flex-wrap: wrap;
        gap: 0.75rem;
        justify-content: center;
        padding: 1.5rem 0;
    }
    
    .social-share a {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }
    
    /* Custom Sections - Mobile */
    .custom-section {
        padding: 2rem 0;
        margin: 2rem 0;
    }
    
    .custom-section h2 {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }
    
    /* About/Services/Contact - Mobile */
    .about-section,
    .services-section,
    .contact-section {
        padding: 2rem 0;
        margin: 2rem 0;
    }
    
    .about-section h2,
    .services-section h2,
    .contact-section h2 {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
        text-align: center;
    }
    
    /* Related Posts - Mobile */
    .related-posts {
        margin-top: 3rem;
        padding-top: 2rem;
    }
    
    .related-posts h2 {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
        text-align: center;
    }
    
    /* Reading Progress - Mobile */
    .reading-progress {
        height: 3px;
    }
    
    /* Smooth Scrolling Enhancement */
    * {
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Improved Touch Targets */
    a, button, input, select {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Card Hover Effects Disabled on Mobile */
    .post-card:hover {
        transform: none;
    }
    
    .post-card:hover .post-image img {
        transform: none;
    }
    
    /* Footer - Mobile */
    .site-footer {
        padding: 2rem 0;
        text-align: center;
        font-size: 0.875rem;
    }
    
    /* Improved Spacing - Mobile */
    section {
        margin-bottom: 3rem;
    }
    
    /* Better Typography Scaling */
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    /* Input Fields - Mobile */
    input[type="text"],
    input[type="email"],
    input[type="search"],
    textarea,
    select {
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 48px;
        padding: 0.875rem 1rem;
    }
    
    /* Better Scroll Behavior */
    body {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Container Adjustments */
    .container {
        width: 100%;
    }
}

/* Extra Small Devices */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.875rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    section h2 {
        font-size: 1.5rem;
    }
    
    .post-content h3 {
        font-size: 1.25rem;
    }
    
    .newsletter {
        padding: 2.5rem 1.25rem;
    }
    
    .newsletter h2 {
        font-size: 1.5rem;
    }
    
    .container {
        padding: 0 16px;
    }
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Selection */
::selection {
    background: var(--primary);
    color: white;
}

/* Focus States */
a:focus, button:focus, input:focus, select:focus {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

/* Loading Animation */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.loading {
    animation: shimmer 2s infinite linear;
    background: linear-gradient(to right, #f0f0f0 0%, #e0e0e0 50%, #f0f0f0 100%);
    background-size: 1000px 100%;
}

/* ============================================
   RECIPE WEBSITE STYLES
   ============================================ */

/* Recipe Single Page */
.single-recipe {
    padding: 2rem 0;
}

.recipe-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.recipe-hero-image {
    width: 100%;
    max-height: 500px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    margin-bottom: 3rem;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.recipe-hero-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
    pointer-events: none;
    border-radius: var(--radius-lg);
}

.recipe-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    position: relative;
    z-index: 0;
}

.recipe-content-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.recipe-breadcrumb {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.recipe-breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.recipe-breadcrumb a:hover {
    text-decoration: underline;
}

.recipe-breadcrumb span {
    margin: 0 0.5rem;
    color: var(--text-muted);
}

.recipe-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.recipe-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.recipe-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.meta-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.meta-item div {
    display: flex;
    flex-direction: column;
}

.meta-item strong {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-item span:not(.meta-icon) {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.recipe-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.recipe-tags .tag {
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
}

.recipe-story {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border);
}

.recipe-story h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.recipe-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.recipe-details-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
    margin-bottom: 3rem;
}

.recipe-section {
    margin-bottom: 3rem;
}

.recipe-section h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ingredients-section {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--radius-lg);
}

.ingredients-list {
    list-style: none;
    padding: 0;
}

.ingredients-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 1.05rem;
    line-height: 1.6;
}

.ingredients-list li:last-child {
    border-bottom: none;
}

.ingredient-checkbox {
    margin-top: 0.25rem;
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
}

.ingredients-list li span {
    flex: 1;
}

.nutrition-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.nutrition-section h2 {
    color: white;
    margin-bottom: 1.5rem;
}

.nutrition-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.nutrition-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
}

.nutrition-item strong {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.nutrition-item span {
    font-size: 0.9rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.instructions-section {
    margin-bottom: 3rem;
}

.instructions-list {
    list-style: none;
    padding: 0;
    counter-reset: step-counter;
}

.instructions-list li {
    counter-increment: step-counter;
    margin-bottom: 2rem;
    padding-left: 4rem;
    position: relative;
}

.instruction-step {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.step-number {
    position: absolute;
    left: 0;
    top: 0;
    width: 3rem;
    height: 3rem;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.tips-section,
.substitutions-section,
.storage-section {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}

.tips-section h2,
.substitutions-section h2,
.storage-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.tips-section p,
.substitutions-section p,
.storage-section p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* Related Recipes */
.related-recipes {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid var(--border);
}

.related-recipes-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.related-recipes h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.recipe-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 2rem;
}

.social-share {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.share-label {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1rem;
}

.share-buttons {
    display: flex;
    gap: 0.75rem;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white !important;
    transition: all 0.3s ease;
    text-decoration: none;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    opacity: 0.9;
}

.share-btn.facebook { background-color: #1877f2; }
.share-btn.x-twitter { background-color: #000000; }
.share-btn.whatsapp { background-color: #25d366; }
.share-btn.pinterest { background-color: #e60023; }
.share-btn.email { background-color: #64748b; }

.recipe-print-btn {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

.recipe-print-btn:hover {
    background: var(--bg-primary);
    border-color: var(--primary);
    color: var(--primary);
}

@media (max-width: 600px) {
    .recipe-actions {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .social-share {
        flex-direction: column;
        gap: 1rem;
    }
}

.recipe-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border);
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.recipe-image {
    display: block;
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
}

.recipe-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
    transition: var(--transition);
    pointer-events: none;
}

.recipe-card:hover .recipe-image::before {
    background: rgba(0, 0, 0, 0.2);
}

.recipe-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    opacity: 0.6;
    position: relative;
    z-index: 0;
}

.recipe-card:hover .recipe-image img {
    transform: scale(1.1);
    opacity: 0.75;
}

.recipe-card-content {
    padding: 1.5rem;
}

.recipe-category {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.recipe-card-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.recipe-card-content h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.recipe-card-content h3 a:hover {
    color: var(--primary);
}

.recipe-excerpt {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.recipe-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Recipes Listing Page */
.recipes-page {
    padding: 2rem 0;
}

/* Recipes Page Header - Change 1 */
.recipes-page .page-header {
    text-align: center;
    padding: 4rem 1rem;
    margin-bottom: 4rem;
    background: linear-gradient(to bottom, var(--bg-secondary), var(--bg-primary));
    border-radius: var(--radius-xl);
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.recipes-page .page-header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -0.04em;
    position: relative;
    display: inline-block;
}

.recipes-page .page-header h1::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 20%;
    width: 60%;
    height: 4px;
    background: var(--primary);
    border-radius: 50px;
    opacity: 0.8;
}

.recipes-page .page-header .page-description {
    font-size: 1.35rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0.5rem auto 0;
    line-height: 1.6;
    font-weight: 500;
}

.recipes-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 4rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    align-items: flex-start;
}

.filter-toggle-btn {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
}

.filter-toggle-btn:hover {
    background: var(--bg-tertiary);
}

.filter-toggle-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Filter Sidebar - Change 2 */
.recipes-filters {
    background: var(--bg-primary);
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    height: fit-content;
    position: sticky;
    top: 108px;
    transition: var(--transition);
}

.recipes-filters h2 {
    font-size: 1.85rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-light);
    padding-bottom: 1rem;
    letter-spacing: -0.02em;
}

.filter-group {
    margin-bottom: 2rem;
}

.filter-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-group select {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-light);
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-fast);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.25rem center;
    background-size: 1.25rem;
}

.filter-group select:hover {
    border-color: var(--border);
    background-color: var(--bg-primary);
}

.filter-group select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    background-color: var(--bg-primary);
}

.filters-form .btn {
    width: 100%;
    padding: 1.15rem;
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1rem;
    letter-spacing: 0.02em;
}

.filters-form .btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-light);
}

.filters-form .btn-secondary:hover {
    background: var(--border-light);
    border-color: var(--border);
}

.recipes-content {
    min-height: 500px;
}

.recipes-results-info {
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: flex-end;
}

.recipes-results-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    background: var(--bg-secondary);
    border-radius: 50px;
    border: 1px solid var(--border-light);
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.pagination .btn {
    min-width: 44px;
    padding: 0.75rem 1rem;
}

/* Mobile Responsive - Recipes */
@media (max-width: 768px) {
    .recipes-page .page-header {
        padding: 3rem 1.5rem;
        margin-bottom: 3rem;
        border-radius: var(--radius-lg);
    }

    .recipes-page .page-header h1 {
        font-size: 2.25rem;
        margin-bottom: 0.5rem;
    }

    .recipes-page .page-header .page-description {
        font-size: 1.1rem;
    }

    .recipes-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
    }
    
    .filter-toggle-btn {
        display: flex; /* Show toggle on mobile */
        margin: 0 1rem 2rem;
        width: calc(100% - 2rem);
    }
    
    .recipes-filters {
        display: none; /* Hide filters by default on mobile */
        position: static;
        margin-bottom: 2rem;
        padding: 1.5rem;
        box-shadow: var(--shadow-md);
        border-radius: var(--radius-lg);
        animation: fadeIn 0.3s ease-out;
    }
    
    .recipes-filters.show {
        display: block; /* Show filters when active */
    }
    
    .filters-form {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .recipes-filters h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .filter-group {
        margin-bottom: 0.5rem;
    }
    
    .filters-form .btn {
        margin-bottom: 0.5rem;
    }
    
    .recipes-results-info {
        justify-content: center;
        margin-bottom: 1.5rem;
    }

    .recipe-details-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .recipe-header h1 {
        font-size: 1.75rem;
    }
    
    .recipe-meta-info {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nutrition-grid {
        grid-template-columns: 1fr;
    }
    
    .instructions-list li {
        padding-left: 3rem;
    }
    
    .step-number {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }

    .recipe-hero-image {
        max-height: 300px;
        margin-bottom: 2rem;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   HOMEPAGE SIDEBAR
   ============================================ */

.homepage-layout {
    padding: 2rem 0;
    width: 100%;
    margin: 0;
    padding-left: 0;
    padding-right: 0;
}

/* Homepage Layout - Full Width */
.homepage-full-width {
    padding: 3rem 0;
}

.category-nav-wrapper {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: relative;
    z-index: 900;
}

/* Scroll indicator gradient */
.category-nav-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 60px;
    background: linear-gradient(to right, transparent, var(--bg-secondary));
    pointer-events: none;
    z-index: 2;
}

.category-nav-scroll {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 1rem 0;
    scrollbar-width: none; 
    -webkit-overflow-scrolling: touch;
}

.category-nav-pill {
    display: inline-flex;
    align-items: center;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 50px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    transition: var(--transition-fast);
    padding: 0.5rem 1rem;
    gap: 0.5rem;
}

.pill-count {
    font-size: 0.75rem;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    padding: 0.1rem 0.5rem;
    border-radius: 20px;
    font-weight: 700;
}

.latest-recipes {
    margin-bottom: 4rem;
}

.latest-recipes h2,
.recent-posts h2,
.featured-posts h2 {
    font-size: 2.25rem;
    margin-bottom: 2.5rem;
    color: var(--text-primary);
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
}

.recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
}

/* Specific Home Page Overrides */
.homepage-main-content .recipes-grid,
.homepage-main-content .posts-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.homepage-main-content .recipe-excerpt,
.homepage-main-content .post-excerpt {
    display: none;
}

@media (max-width: 1200px) {
    .homepage-main-content .recipes-grid,
    .homepage-main-content .posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .homepage-main-content .recipes-grid,
    .homepage-main-content .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.homepage-main-content {
    min-height: 500px;
}

/* ============================================
   CATEGORIES PAGE
   ============================================ */

.categories-page {
    padding: 2rem 0;
}

.categories-page .page-header {
    text-align: center;
    margin-bottom: 4rem;
}

.categories-page .page-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.categories-page .page-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

.collections-section {
    margin-bottom: 4rem;
}

.collections-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.collection-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.collection-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.collection-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.collection-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: white;
}

.collection-card p {
    font-size: 0.95rem;
    opacity: 0.9;
    line-height: 1.6;
}

.category-group {
    margin-bottom: 4rem;
}

.category-group h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: var(--bg-primary);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.category-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.category-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}

.category-count {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: auto;
    align-self: flex-start;
}

.category-group-card {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border: 2px dashed var(--primary);
}

.category-group-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.subcategories {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.subcategory-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    border: 1px solid var(--border);
}

.subcategory-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateX(5px);
}

.subcategory-link span:first-child {
    font-weight: 500;
}

.subcategory-link span:last-child {
    font-size: 0.85rem;
    opacity: 0.7;
}

.difficulty-grid,
.time-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.difficulty-card,
.time-card {
    background: var(--bg-primary);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-decoration: none;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.difficulty-card:hover,
.time-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.difficulty-card.easy {
    border-color: #10b981;
}

.difficulty-card.medium {
    border-color: #f59e0b;
}

.difficulty-card.hard {
    border-color: #ef4444;
}

.difficulty-icon,
.time-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.difficulty-card h3,
.time-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.difficulty-card p,
.time-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.trending-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid var(--border);
}

.trending-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-primary);
}

/* Collection Page */
.collection-page {
    padding: 2rem 0;
}

.collection-page .page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.collection-page .page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.collection-page .page-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Mobile Responsive - Homepage & Categories */
@media (max-width: 768px) {
    .site-header {
        padding: 0.75rem 0;
    }
    
    .homepage-full-width {
        padding: 1.5rem 0;
    }
    
    .category-nav-wrapper {
        position: relative;
        z-index: 900;
        padding: 0.75rem 0;
        background: var(--bg-primary);
        border-bottom: 1px solid var(--border);
        margin-bottom: 1rem;
    }
    
    .category-nav-wrapper::after {
        background: linear-gradient(to right, transparent, var(--bg-primary));
        width: 40px;
    }

    .category-nav-scroll {
        padding: 0 1rem;
        display: flex;
        gap: 0.5rem;
        -webkit-overflow-scrolling: touch;
        overflow-x: auto;
    }

    .category-nav-pill {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
        background: var(--bg-secondary);
        border: 1px solid var(--border-light);
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .pill-count {
        font-size: 0.7rem;
    }
    
    .latest-recipes h2,
    .recent-posts h2,
    .featured-posts h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
        padding-bottom: 0.75rem;
    }

    .recipes-grid,
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }

    .recipe-card-content,
    .post-content {
        padding: 1.5rem;
    }

    .recipe-card-content h3,
    .post-content h3 {
        font-size: 1.25rem;
        line-height: 1.4;
        margin-bottom: 0.75rem;
        height: auto; 
        overflow: visible;
        display: block;
    }

    .recipe-excerpt,
    .post-excerpt {
        display: block; 
    }

    .recipe-card-meta {
        font-size: 0.9rem;
        gap: 1rem;
    }

    .recipe-card-content .btn-primary,
    .post-content .btn-primary {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        width: auto;
        text-align: center;
    }
    
    .categories-page .page-header h1 {
        font-size: 2rem;
    }
    
    .collections-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .difficulty-grid,
    .time-grid {
        grid-template-columns: 1fr;
    }
}

/* User Menu Styles */
.user-menu {
    position: relative;
    margin-left: 1rem;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--nav-text);
    transition: var(--transition);
    font-size: 0.9rem;
}

.user-menu-btn:hover {
    background: var(--bg-secondary);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.user-name {
    font-weight: 500;
}

.user-menu-dropdown {
    position: relative;
}

.user-menu-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    min-width: 200px;
    z-index: 1000;
    overflow: hidden;
}

.user-menu-dropdown-content.show {
    display: block;
}

.user-menu-dropdown-content a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.user-menu-dropdown-content a:hover {
    background: var(--bg-secondary);
    color: var(--primary);
}

.user-menu-divider {
    height: 1px;
    background: var(--border);
    margin: 0.5rem 0;
}

.btn-login {
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
}

.btn-login:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* Recipe Favorite Button */
.recipe-favorite-btn-wrapper {
    margin-top: 1.5rem;
}

.btn-favorite {
    padding: 0.75rem 1.5rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.btn-favorite:hover {
    background: var(--bg-primary);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.btn-favorite.favorited {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.btn-favorite.favorited:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
}

/* Mobile User Menu */
@media (max-width: 768px) {
    .user-name {
        display: none;
    }
    
    .user-menu-btn {
        padding: 0.5rem;
    }
    
    .user-menu-dropdown-content {
        right: -1rem;
        min-width: 180px;
    }
}

/* -------------------------------------------------------------------------- */
/* RTL Support */
/* -------------------------------------------------------------------------- */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .header-content {
    flex-direction: row-reverse;
}

[dir="rtl"] .main-nav {
    margin-left: 0;
    margin-right: auto;
    flex-direction: row-reverse;
}

[dir="rtl"] .nav-search {
    margin-left: 0;
    margin-right: 1.5rem;
}

[dir="rtl"] .hero-search-wrapper {
    flex-direction: row-reverse;
}

[dir="rtl"] .hero-search-icon {
    margin-left: 0.75rem;
    margin-right: 1.25rem;
}

[dir="rtl"] .hero-search-btn {
    border-radius: 50px 0 0 50px;
}

[dir="rtl"] .hero-search-input {
    padding: 1.25rem 1.25rem 1.25rem 3rem;
}

[dir="rtl"] .recipe-card-meta {
    flex-direction: row-reverse;
}

[dir="rtl"] .recipe-card-meta span {
    margin-right: 0;
    margin-left: 1rem;
}

[dir="rtl"] .category-nav-scroll {
    flex-direction: row-reverse;
}

[dir="rtl"] .category-nav-pill {
    margin-right: 0;
    margin-left: 0.5rem;
}

[dir="rtl"] .site-footer .footer-grid {
    text-align: right;
}

[dir="rtl"] .footer-section ul {
    padding-right: 0;
}

[dir="rtl"] .footer-section ul li a {
    padding-left: 0;
    padding-right: 0;
}

[dir="rtl"] .btn-primary, [dir="rtl"] .btn-secondary {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 0.5rem;
}

[dir="rtl"] .user-menu-dropdown-content {
    right: auto;
    left: 0;
}

[dir="rtl"] .user-menu-btn {
    flex-direction: row-reverse;
}

[dir="rtl"] .user-menu-btn svg {
    margin-left: 0;
    margin-right: 0.5rem;
}

[dir="rtl"] .filters-form {
    text-align: right;
}

[dir="rtl"] .filter-group select {
    padding-right: 1rem;
    padding-left: 2.5rem;
    background-position: left 1rem center;
}

[dir="rtl"] .recipes-results-info {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .recipe-info-grid {
    direction: rtl;
}

[dir="rtl"] .recipe-info-item {
    border-right: none;
    border-left: 1px solid var(--border);
}

[dir="rtl"] .recipe-info-item:last-child {
    border-left: none;
}

[dir="rtl"] .nutrition-grid {
    direction: rtl;
}

[dir="rtl"] .instructions-list li {
    padding-left: 0;
    padding-right: 3rem;
}

[dir="rtl"] .instructions-list li::before {
    left: auto;
    right: 0;
}

[dir="rtl"] .ingredients-list li {
    padding-left: 0;
    padding-right: 1.5rem;
}

[dir="rtl"] .ingredients-list li::before {
    left: auto;
    right: 0;
}

[dir="rtl"] .recipe-header-content {
    text-align: center;
}

[dir="rtl"] .header-search-container {
    left: auto;
    right: 0;
}

/* Mobile RTL Adjustments */
@media (max-width: 768px) {
    [dir="rtl"] .main-nav {
        left: auto;
        right: -100%;
        text-align: right;
    }
    
    [dir="rtl"] .main-nav.active {
        right: 0;
    }
    
    [dir="rtl"] .mobile-menu-toggle {
        margin-left: 0;
        margin-right: auto;
    }
}

/* -------------------------------------------------------------------------- */
/* Professional Print Styles */
/* -------------------------------------------------------------------------- */
@media print {
    /* 1. Hide everything except the recipe container */
    header.site-header,
    footer.site-footer,
    .nav-search,
    .mobile-menu-toggle,
    .recipe-breadcrumb,
    .recipe-actions,
    .related-recipes,
    .language-switcher,
    .user-menu,
    .ad-zone,
    .category-nav-wrapper,
    .btn-favorite,
    .btn-collection,
    .recipe-favorite-btn-wrapper,
    #servingsSelector,
    #substitutionsBtn,
    .reset-btn,
    .reading-progress,
    .post-meta,
    .related-posts,
    .social-share {
        display: none !important;
    }

    /* 2. Reset layout for paper */
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
    }

    .main-content {
        padding: 0 !important;
        margin: 0 !important;
    }

    .recipe-container {
        width: 100% !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
    }

    /* 3. Force images to be a reasonable size or hide them to save ink */
    .recipe-hero-image img {
        max-height: 300px;
        object-fit: cover;
        margin-bottom: 20px;
    }

    /* 4. Ensure checkboxes don't show up in print */
    .ingredient-checkbox {
        display: none !important;
    }

    /* 5. Make links black and remove underlines */
    a {
        text-decoration: none !important;
        color: black !important;
    }

    /* 6. Professional headers for paper */
    h1 {
        font-size: 24pt !important;
        margin-bottom: 10pt !important;
    }

    h2 {
        font-size: 18pt !important;
        border-bottom: 1px solid #ccc;
        padding-bottom: 5pt;
        margin-top: 20pt !important;
    }
}
