/*
Theme Name: Happy Science USA Premium
Theme URI: https://happyscience-usa.org
Author: Happy Science USA
Author URI: https://happyscience-usa.org
Description: A premium WordPress theme for Happy Science USA featuring elegant gold and ivory design with modern typography.
Version: 8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: happyscience-premium
*/

/* ============ CSS VARIABLES - MODERNIZED ============ */
:root {
    /* Base colors - refined */
    --white: #ffffff;
    --ivory: #faf9f7;
    --cream: #f5f4f1;
    --beige: #e9e6e0;
    --taupe: #9d958a;
    --warm-gray: #6b6560;
    --charcoal: #2d2926;
    --black: #1a1817;
    
    /* Gold palette - richer, more refined */
    --gold: #b8986a;
    --gold-dark: #9a7d52;
    --gold-light: #d4bc8a;
    --gold-muted: rgba(184, 152, 106, 0.12);
    
    /* Modern additions */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
    --shadow-xl: 0 24px 60px rgba(0,0,0,0.1);
    
    /* Spacing scale */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;
    
    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    
    /* Transitions */
    --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============ RESET & BASE ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--ivory);
    color: var(--charcoal);
    overflow-x: hidden;
    line-height: 1.7;
    font-weight: 400;
    font-size: 16px;
    letter-spacing: -0.01em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.4s var(--ease-out);
}

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

/* Selection styling */
::selection {
    background: var(--gold-muted);
    color: var(--charcoal);
}

/* Force all sections below header */
main,
section,
.hero,
.master-section,
.benefits-section,
.tvshow-section,
.principles,
.new-here-section,
.testimonials-section,
.explore-section,
.membership-cta,
.content-section,
.page-hero,
article,
.elementor-section,
.elementor-container,
.elementor-widget-wrap,
[class*="section"],
[class*="Section"] {
    position: relative;
    z-index: 1;
}

/* Ensure header always on top - strengthened */
.site-header,
header,
#masthead,
.elementor-location-header,
[data-elementor-type="header"],
.site-header *,
header * {
    z-index: 99999 !important;
}

.main-navigation .sub-menu,
.sub-menu,
.dropdown-menu,
nav .sub-menu,
.menu-item-has-children .sub-menu {
    z-index: 999999 !important;
    position: absolute !important;
}

/* ============ HEADER - MODERN GLASSMORPHISM ============ */
.site-header {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999 !important;
    padding: 1.25rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(250, 249, 247, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(184, 152, 106, 0.08);
    transition: all 0.4s var(--ease-out);
}

.site-header.scrolled {
    padding: 1rem 5%;
    box-shadow: var(--shadow-sm);
}

.site-logo {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--charcoal);
    text-decoration: none;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-logo span {
    color: var(--gold);
}

.main-navigation ul {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    align-items: center;
}

.main-navigation ul li a {
    color: var(--charcoal);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: all 0.3s var(--ease-out);
    position: relative;
}

.main-navigation ul li a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--gold);
    transition: width 0.3s var(--ease-out);
}

.main-navigation ul li a:hover {
    color: var(--gold);
}

.main-navigation ul li a:hover::after {
    width: 100%;
}

/* Dropdown Arrow for WordPress menus */
.main-navigation > ul > li.menu-item-has-children > a::after {
    content: none;
}

.main-navigation > ul > li.menu-item-has-children > a {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.main-navigation > ul > li.menu-item-has-children > a svg {
    width: 12px;
    height: 12px;
    transition: transform 0.3s var(--ease-out);
}

.main-navigation > ul > li.menu-item-has-children:hover > a svg {
    transform: rotate(180deg);
}

/* Dropdown Menu Styles - Modern */
.main-navigation .sub-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: -12px;
    min-width: 200px;
    background: var(--white);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.3s var(--ease-out);
    list-style: none;
    margin: 0;
    padding: 0.5rem;
    z-index: 10000;
    display: block;
    flex-direction: column;
}

.main-navigation > ul > li {
    position: relative;
}

.main-navigation > ul > li:hover > .sub-menu,
.main-navigation > ul > li.touch-open > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-navigation .sub-menu li {
    margin: 0;
    display: block;
    width: 100%;
}

.main-navigation .sub-menu a {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: 0;
    color: var(--charcoal);
    border-radius: var(--radius-sm);
    transition: all 0.2s var(--ease-out);
    white-space: nowrap;
}

.main-navigation .sub-menu a::after {
    display: none;
}

.main-navigation .sub-menu a:hover {
    background: var(--gold-muted);
    color: var(--gold-dark);
    padding-left: 1rem;
}

.header-cta {
    padding: 0.75rem 1.75rem;
    background: var(--charcoal);
    color: var(--white);
    border: none;
    border-radius: var(--radius-xl);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-decoration: none;
    transition: all 0.4s var(--ease-out);
}

.header-cta:hover {
    background: var(--gold);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.menu-toggle:hover {
    background: var(--gold-muted);
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--charcoal);
    border-radius: 2px;
    transition: all 0.3s var(--ease-out);
}

/* ============ PAGE HERO - CLEAN & MODERN ============ */
.page-hero {
    padding: 10rem 5% 5rem;
    background: var(--charcoal);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(184, 152, 106, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.page-hero.hero-gold {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
}

.page-hero.hero-dark {
    background: var(--black);
}

.page-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    position: relative;
    z-index: 1;
}

.page-line {
    width: 32px;
    height: 1px;
    background: var(--gold);
    opacity: 0.6;
}

.page-hero.hero-gold .page-line {
    background: var(--white);
    opacity: 0.4;
}

.page-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold);
}

.page-hero.hero-gold .page-label {
    color: rgba(255, 255, 255, 0.9);
}

.page-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 400;
    color: var(--white);
    margin-bottom: 1.25rem;
    position: relative;
    z-index: 1;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.page-title em {
    font-style: italic;
    color: var(--gold-light);
}

.page-subtitle {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.6);
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.page-hero.hero-gold .page-subtitle {
    color: rgba(255, 255, 255, 0.85);
}

/* ============ SECTION STYLES - REFINED ============ */
.content-section {
    padding: var(--space-2xl) 5%;
}

.content-section.bg-ivory {
    background: var(--ivory);
}

.content-section.bg-cream {
    background: var(--cream);
}

.content-section.bg-charcoal {
    background: var(--charcoal);
}

.content-section.bg-gold {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.section-line {
    width: 32px;
    height: 1px;
    background: var(--gold);
    opacity: 0.5;
}

.section-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold);
}

.section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 400;
    color: var(--charcoal);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.section-title em {
    font-style: italic;
    color: var(--gold);
}

.bg-charcoal .section-title {
    color: var(--white);
}

.bg-charcoal .section-label {
    color: var(--gold-light);
}

/* ============ BUTTONS - MODERN & REFINED ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-decoration: none;
    transition: all 0.4s var(--ease-out);
    cursor: pointer;
    border: none;
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
}

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

.btn-gold:hover {
    background: var(--gold-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--charcoal);
    border: 1.5px solid var(--beige);
}

.btn-outline:hover {
    border-color: var(--gold);
    color: var(--gold);
    transform: translateY(-2px);
}

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

.btn-white:hover {
    background: var(--ivory);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-dark {
    background: var(--charcoal);
    color: var(--white);
}

.btn-dark:hover {
    background: var(--black);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.section-link {
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--gold);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s var(--ease-out);
    position: relative;
}

.section-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--gold);
    transition: width 0.3s var(--ease-out);
}

.section-link:hover {
    gap: 0.75rem;
}

.section-link:hover::after {
    width: 100%;
}

/* ============ CARDS - MODERN ELEVATED STYLE ============ */
.card {
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.5s var(--ease-out);
    box-shadow: var(--shadow-sm);
}

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

.card-image {
    overflow: hidden;
    aspect-ratio: 16/10;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out);
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: var(--space-md);
}

.card-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--charcoal);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.card-text {
    font-size: 0.95rem;
    color: var(--warm-gray);
    line-height: 1.65;
}

/* ============ GRID LAYOUTS - REFINED ============ */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

/* ============ FORMS - MODERN & CLEAN ============ */
.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--charcoal);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 1.5px solid var(--beige);
    border-radius: var(--radius-md);
    background: var(--white);
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    color: var(--charcoal);
    transition: all 0.3s var(--ease-out);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 4px var(--gold-muted);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--taupe);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b6560' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.25rem center;
}

/* ============ FOOTER - MODERN & REFINED ============ */
.site-footer {
    padding: var(--space-2xl) 5% var(--space-lg);
    background: var(--charcoal);
    color: var(--white);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(4, 1fr);
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.footer-brand .site-logo {
    color: var(--white);
    display: inline-block;
    margin-bottom: var(--space-sm);
}

.footer-brand .site-logo span {
    color: var(--gold-light);
}

.footer-text {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.7;
    max-width: 280px;
}

.footer-title {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold-light);
    margin-bottom: var(--space-md);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s var(--ease-out);
    display: inline-block;
}

.footer-links a:hover {
    color: var(--white);
    transform: translateX(4px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    max-width: 1200px;
    margin: 0 auto;
}

.footer-bottom p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.35);
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all 0.3s var(--ease-out);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.social-links a:hover {
    color: var(--gold-light);
}

/* ============ DIVIDER - SUBTLE ============ */
.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: var(--space-lg) 0;
    background: var(--cream);
}

.divider-line {
    width: 60px;
    height: 1px;
    background: var(--gold);
    opacity: 0.2;
}

.divider-symbol {
    color: var(--gold);
    font-size: 1rem;
    opacity: 0.5;
}

/* ============ TESTIMONIALS - MODERN CARDS ============ */
.testimonial-card {
    padding: 2.5rem var(--space-lg) var(--space-lg);
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: var(--radius-lg);
    transition: all 0.5s var(--ease-out);
    box-shadow: var(--shadow-sm);
    position: relative;
}

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

.testimonial-card::before {
    content: '"';
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 5rem;
    color: var(--gold);
    line-height: 1;
    opacity: 0.2;
    position: absolute;
    top: 0.5rem;
    left: 1.25rem;
}

.testimonial-text {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.1rem;
    font-style: italic;
    color: var(--charcoal);
    line-height: 1.65;
    margin-bottom: var(--space-md);
    margin-top: 0.5rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--gold-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.1rem;
    color: var(--gold);
    object-fit: cover;
    border: 3px solid var(--gold-muted);
}

.testimonial-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--charcoal);
}

.testimonial-location {
    font-size: 0.85rem;
    color: var(--warm-gray);
}

/* ============ ANIMATIONS - REFINED ============ */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-float {
    animation: float 5s ease-in-out infinite;
}

.animate-fade-in {
    animation: fadeInUp 0.6s var(--ease-out) forwards;
}

.animate-scale-in {
    animation: scaleIn 0.5s var(--ease-out) forwards;
}

/* Staggered animations */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }

/* ============ RESPONSIVE - REFINED ============ */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }
}

@media (max-width: 768px) {
    :root {
        --space-xl: 3rem;
        --space-2xl: 4rem;
    }
    
    .site-header {
        padding: 1rem 5%;
    }

    .main-navigation,
    .header-cta {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .page-hero {
        padding: 7rem 5% 3rem;
    }

    .page-eyebrow .page-line,
    .section-eyebrow .section-line {
        display: none;
    }

    .content-section {
        padding: var(--space-xl) 5%;
    }

    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-lg);
    }

    .footer-brand {
        order: -1;
    }
    
    .footer-text {
        max-width: 100%;
        margin: 0 auto;
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-sm);
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* ============ MOBILE DONATE BUTTON ============ */
@media (max-width: 768px) {
    .menu-item-donate > a {
        display: inline-block !important;
        margin: 0.75rem 1rem 0.25rem !important;
        padding: 0.875rem 2rem !important;
        background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%) !important;
        color: var(--white) !important;
        border-radius: var(--radius-xl) !important;
        font-weight: 600 !important;
        font-size: 0.95rem !important;
        text-align: center !important;
        letter-spacing: 0.03em !important;
        box-shadow: 0 4px 15px rgba(184, 152, 106, 0.4) !important;
        transition: all 0.3s var(--ease-out) !important;
        width: calc(100% - 2rem) !important;
    }

    .menu-item-donate > a:hover,
    .menu-item-donate > a:active {
        background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 100%) !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 6px 20px rgba(184, 152, 106, 0.5) !important;
    }

    .menu-item-donate > a::after {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.8rem;
    }
}
