/*
 Theme Name:   Darwin Theme
 Theme URI:    https://www.wpdarwin.com
 Description:  Premium Web 3.0 child theme for GeneratePress — custom glassmorphism header, 3-column footer, and the full Darwin design system.
 Author:       AI Solutions Guru
 Author URI:   https://solutionsguru.ai
 Template:     generatepress
 Version:      1.0.0
 Text Domain:  darwin-theme
*/

/* ═══════════════════════════════════════════
   DESIGN TOKENS
   ═══════════════════════════════════════════ */
:root {
    --darwin-font: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    --darwin-accent: #6366f1;
    --darwin-accent-light: #8b5cf6;
    --darwin-accent-dark: #4f46e5;
    --darwin-gradient: linear-gradient(135deg, #6366f1, #8b5cf6);
    --darwin-text-primary: #1a1a2e;
    --darwin-text-secondary: #4a4a6a;
    --darwin-text-muted: #8888a8;
    --darwin-bg-primary: #ffffff;
    --darwin-bg-soft: #f8f9fc;
    --darwin-glass-bg: rgba(255, 255, 255, 0.85);
    --darwin-glass-border: rgba(99, 102, 241, 0.08);
    --darwin-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --darwin-shadow-md: 0 4px 30px rgba(0, 0, 0, 0.06);
    --darwin-header-height: 180px;
    --darwin-footer-bg: #1a1a2e;
}

/* ═══════════════════════════════════════════
   GLOBAL FONT OVERRIDE
   ═══════════════════════════════════════════ */
body,
body .site {
    font-family: var(--darwin-font) !important;
}

/* ═══════════════════════════════════════════
   HEADER — GLASSMORPHISM NAV
   ═══════════════════════════════════════════ */
.darwin-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    height: var(--darwin-header-height);
    background: var(--darwin-glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--darwin-glass-border);
    transition: box-shadow 0.3s ease, background 0.3s ease;
}

.darwin-header.scrolled {
    box-shadow: var(--darwin-shadow-md);
    background: rgba(255, 255, 255, 0.95);
}

.darwin-header__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* Logo */
.darwin-header__logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 0.5rem;
}

.darwin-header__logo img {
    height: 80px;
    width: auto;
}

.darwin-header__logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--darwin-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

/* Desktop Nav */
.darwin-header__nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.darwin-header__nav a {
    display: block;
    padding: 0.5rem 1.1rem;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--darwin-text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
}

.darwin-header__nav a:hover {
    color: var(--darwin-accent);
    background: rgba(99, 102, 241, 0.06);
}

.darwin-header__nav a.active {
    color: var(--darwin-accent);
    font-weight: 600;
}

/* CTA button in nav */
.darwin-header__cta {
    margin-left: 0.75rem;
    padding: 0.55rem 1.4rem !important;
    background: var(--darwin-gradient) !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    font-size: 0.88rem !important;
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.25);
    transition: all 0.3s ease !important;
}

.darwin-header__cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35) !important;
    background: linear-gradient(135deg, #4f46e5, #7c3aed) !important;
}

/* Mobile Hamburger */
.darwin-header__toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 6px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.darwin-header__toggle:hover {
    background: rgba(99, 102, 241, 0.06);
}

.darwin-header__toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--darwin-text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.darwin-header__toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.darwin-header__toggle.open span:nth-child(2) {
    opacity: 0;
}

.darwin-header__toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav panel */
.darwin-header__mobile-nav {
    display: none;
    position: fixed;
    top: var(--darwin-header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 999;
    padding: 2rem 1.5rem;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.darwin-header__mobile-nav.open {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.darwin-header__mobile-nav a {
    display: block;
    padding: 1rem 0;
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--darwin-text-primary);
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: color 0.2s ease;
}

.darwin-header__mobile-nav a:hover {
    color: var(--darwin-accent);
}

.darwin-header__mobile-nav .darwin-header__cta {
    display: inline-block;
    text-align: center;
    margin-top: 1rem;
    margin-left: 0;
    padding: 0.75rem 1.5rem !important;
    border-bottom: none;
}

/* ═══════════════════════════════════════════
   FOOTER — PREMIUM 3-COLUMN
   ═══════════════════════════════════════════ */
.darwin-footer {
    background: var(--darwin-footer-bg);
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--darwin-font);
    position: relative;
}

/* Gradient accent bar */
.darwin-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--darwin-gradient);
}

.darwin-footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3.5rem 1.5rem 2rem;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 3rem;
}

/* Footer columns */
.darwin-footer__col h4 {
    color: #fff;
    font-size: 0.92rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 1.25rem;
}

.darwin-footer__col p {
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 0 0 1rem;
    color: rgba(255, 255, 255, 0.6);
}

.darwin-footer__logo {
    height: 32px;
    width: auto;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.darwin-footer__links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.darwin-footer__links li {
    margin-bottom: 0.6rem;
}

.darwin-footer__links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.darwin-footer__links a:hover {
    color: var(--darwin-accent-light);
}

/* Footer bottom bar */
.darwin-footer__bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.4);
}

.darwin-footer__bottom a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.2s ease;
}

.darwin-footer__bottom a:hover {
    color: var(--darwin-accent-light);
}

.darwin-footer__social {
    display: flex;
    gap: 1rem;
}

.darwin-footer__social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.2s ease;
}

.darwin-footer__social a:hover {
    background: var(--darwin-accent);
    color: #fff;
}

.darwin-footer__social svg {
    width: 16px;
    height: 16px;
}

/* ═══════════════════════════════════════════
   HIDE GENERATEPRESS DEFAULTS
   ═══════════════════════════════════════════ */
.site-header.has-inline-mobile-toggle,
footer.site-info {
    display: none !important;
}

/* ═══════════════════════════════════════════
   PAGE CONTENT SPACING
   ═══════════════════════════════════════════ */
.site-content {
    padding-top: 0 !important;
}

.page .inside-article {
    padding-top: 0 !important;
}

/* Remove default page title since hero replaces it */
.page .entry-header {
    display: none;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 768px) {
    .darwin-header__nav {
        display: none;
    }

    .darwin-header__toggle {
        display: flex;
    }

    .darwin-footer__inner {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2.5rem 1.5rem 1.5rem;
    }

    .darwin-footer__bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}