/* Better Sexual Wellness - Main Stylesheet v2.0 */

:root {
    /* Modern Color Palette */
    --primary-color: #1a365d;
    --primary-light: #2d4a7c;
    --secondary-color: #d53f8c;
    --secondary-light: #ed64a6;
    --accent-color: #4299e1;
    --accent-light: #63b3ed;
    --text-color: #2d3748;
    --text-light: #4a5568;
    --light-bg: #f7fafc;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-warm: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-cool: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --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);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden;
}

/* Header & Navigation */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
}

.main-nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: var(--white);
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-light);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--white);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%),
                url('https://images.unsplash.com/photo-1516589178581-6cd7833ae3b2?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--white);
    text-align: center;
    padding: 8rem 2rem 10rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(237, 100, 166, 0.2) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(99, 179, 237, 0.2) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -1px;
    animation: fadeInUp 0.8s ease-out;
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    max-width: 650px;
    margin: 0 auto;
    opacity: 0.95;
    line-height: 1.8;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

/* Content Sections */
.content-section {
    padding: 5rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

.content-section:nth-child(even) {
    background: linear-gradient(180deg, var(--white) 0%, var(--light-bg) 100%);
}

.content-section h2 {
    color: var(--primary-color);
    font-size: clamp(2rem, 4vw, 2.75rem);
    margin-bottom: 3rem;
    font-weight: 800;
    line-height: 1.3;
    text-align: center;
}

/* Article Grid */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.featured-article {
    background: var(--white);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.featured-article::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.featured-article:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.featured-article:hover::before {
    transform: scaleX(1);
}

.featured-article h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.4;
}

.featured-article p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    line-height: 1.7;
    font-size: 0.98rem;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.read-more::after {
    content: '→';
    transition: transform 0.3s ease;
}

.read-more:hover {
    color: var(--primary-color);
    gap: 0.75rem;
}

.read-more:hover::after {
    transform: translateX(4px);
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0f2744 100%);
    color: rgba(255, 255, 255, 0.9);
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%);
}

.footer-content p {
    font-size: 0.95rem;
    opacity: 0.8;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.mobile-menu-toggle span {
    width: 30px;
    height: 3px;
    background: var(--white);
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-nav {
        padding: 1rem 1.5rem;
        position: relative;
    }

    .logo {
        font-size: 1.4rem;
    }

    .mobile-menu-toggle {
        display: flex;
        position: absolute;
        right: 1.5rem;
        top: 50%;
        transform: translateY(-50%);
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-color);
        flex-direction: column;
        gap: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
        box-shadow: var(--shadow-lg);
    }

    .nav-links.active {
        max-height: 400px;
        padding: 1rem 0;
    }

    .nav-links li {
        padding: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links a {
        display: block;
        padding: 1rem 1.5rem;
        font-size: 0.95rem;
    }

    .nav-links a::after {
        display: none;
    }

    .hero {
        padding: 4rem 1.5rem 5rem;
        background-attachment: scroll;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .content-section {
        padding: 3rem 1.5rem;
    }

    .content-section h2 {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }

    .article-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .featured-article {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .main-nav {
        padding: 1rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    .mobile-menu-toggle {
        right: 1rem;
    }

    .nav-links a {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }

    .hero {
        padding: 3rem 1rem 4rem;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .featured-article {
        padding: 1.5rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Reveal Animation */
.content-section {
    animation-delay: 0.2s;
}

/* Loading State */
.featured-article {
    animation: fadeIn 0.6s ease-out forwards;
}

.featured-article:nth-child(1) { animation-delay: 0.1s; }
.featured-article:nth-child(2) { animation-delay: 0.2s; }
.featured-article:nth-child(3) { animation-delay: 0.3s; }
.featured-article:nth-child(4) { animation-delay: 0.4s; }

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus Styles */
a:focus,
button:focus {
    outline: 2px solid var(--accent-light);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    header,
    footer,
    .hero-cta {
        display: none;
    }
}
