/* ===================================================================
   EDUCA TU BILLETERA - Main Stylesheet
   Color palette based on logo: Green, Dark Green, Cream
   =================================================================== */

/* CSS Variables */
:root {
    /* Primary Colors - Based on Logo */
    --primary: #4CAF50;
    --primary-dark: #1B5E20;
    --primary-light: #81C784;
    --primary-lighter: #C8E6C9;

    /* Secondary/Accent */
    --accent: #2E7D32;
    --accent-light: #66BB6A;

    /* Neutrals */
    --background: #F8F9F5;
    --surface: #FFFFFF;
    --surface-elevated: #FFFFFF;
    --text: #1B5E20;
    --text-light: #558B2F;
    --text-muted: #689F38;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    --gradient-hero: linear-gradient(135deg, #1B5E20 0%, #2E7D32 50%, #4CAF50 100%);
    --gradient-card: linear-gradient(145deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(27, 94, 32, 0.08);
    --shadow-md: 0 4px 16px rgba(27, 94, 32, 0.12);
    --shadow-lg: 0 8px 32px rgba(27, 94, 32, 0.16);
    --shadow-xl: 0 16px 48px rgba(27, 94, 32, 0.2);

    /* Typography */
    --font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --container-max: 1200px;
    --section-padding: 100px;
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --border-radius-lg: 24px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    font-weight: 500;
}

/* ===================================================================
   COMMENTS SECTION
   =================================================================== */
.comments-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.comments-title {
    font-size: 1.5rem;
    margin-bottom: 24px;
    color: var(--primary-dark);
}

.comment-form {
    background: var(--surface);
    padding: 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 40px;
    border: 1px solid #eee;
}

.comment-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius-sm);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s;
    background: #fff;
}

.comment-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
    outline: none;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comment-item {
    display: flex;
    gap: 16px;
    background: #fff;
    padding: 20px;
    border-radius: var(--border-radius);
    border: 1px solid #eee;
}

.comment-avatar {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    align-items: center;
}

.comment-author {
    font-weight: 700;
    color: var(--primary-dark);
}

.comment-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.comment-text {
    color: var(--text);
    line-height: 1.6;
}

.no-comments {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 20px;
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary-dark);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
}

h4 {
    font-size: 1.125rem;
}

.highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.highlight-link {
    font-weight: 700 !important;
    background: var(--primary-lighter);
    padding: 8px 16px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.highlight-link:hover {
    background: var(--primary-light) !important;
    color: white !important;
    transform: translateY(-2px);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md), 0 0 0 0 rgba(76, 175, 80, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 0 4px rgba(76, 175, 80, 0.2);
}

.btn-secondary {
    background: var(--surface);
    color: var(--primary-dark);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary-lighter);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.125rem;
}

.btn-full {
    width: 100%;
}

/* Section Styles */
.section {
    padding: var(--section-padding) 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-badge {
    display: inline-block;
    padding: 8px 16px;
    background: var(--primary-lighter);
    color: var(--primary-dark);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 50px;
    margin-bottom: 16px;
}

.section-header h2 {
    margin-bottom: 16px;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-light);
}

.section-cta {
    text-align: center;
    margin-top: 48px;
}

.embedded-cta {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    padding: 24px;
    border-radius: 12px;
    margin: 32px 0;
    border-left: 5px solid var(--primary);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.embedded-cta h3 {
    color: var(--primary-dark);
    margin-top: 0 !important;
    margin-bottom: 12px !important;
    font-size: 1.25rem !important;
}

.embedded-cta p {
    color: var(--text);
    margin-bottom: 20px !important;
}

.comment-card {
    background: #ffffff;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    margin-bottom: 48px;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.comment-card h4 {
    margin-bottom: 24px;
    font-size: 1.25rem;
    color: var(--primary-dark);
    font-weight: 700;
}

/* ===================================================================
   HEADER
   =================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: all var(--transition-normal);
}

.header.scrolled {
    padding: 12px 0;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid rgba(76, 175, 80, 0.1);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.brand-name {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.2;
}

.brand-educa {
    color: #1B4D4D;
}

.brand-billetera {
    color: var(--primary);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-menu a {
    padding: 10px 16px;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
}

.nav-menu a:hover {
    color: var(--primary);
    background: var(--primary-lighter);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--primary-dark);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

/* ===================================================================
   HERO SECTION (REDESIGNED)
   =================================================================== */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding: 140px 0 80px;
    overflow: hidden;
    background: radial-gradient(circle at 10% 20%, rgba(76, 175, 80, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(33, 147, 176, 0.1) 0%, transparent 20%),
        linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    /* Subtle Mesh base */
}

/* Abstract shapes for depth */
.hero::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -5%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(76, 175, 80, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    filter: blur(40px);
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(33, 147, 176, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    filter: blur(40px);
}

.hero .container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

/* Hide old bg */
.hero-bg {
    display: none;
}

.hero-content {
    max-width: 600px;
}

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    background: var(--primary-lighter);
    color: var(--primary-dark);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 50px;
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease forwards;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    /* Extra Bold */
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -1px;
    animation: fadeInUp 0.6s ease 0.1s forwards;
    opacity: 0;
}

.hero-content h1 .highlight {
    color: var(--primary);
    /* Lighter green contrast */
    position: relative;
    display: inline-block;
    z-index: 1;
    background: none;
    -webkit-text-fill-color: initial;
    text-shadow: none;
}

.hero-content p {
    font-size: 1.25rem;
    font-family: 'Poppins', sans-serif;
    color: var(--text-light);
    margin-bottom: 32px;
    line-height: 1.6;
    animation: fadeInUp 0.6s ease 0.2s forwards;
    opacity: 0;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease 0.3s forwards;
    opacity: 0;
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--primary-lighter);
    animation: fadeInUp 0.6s ease 0.4s forwards;
    opacity: 0;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.hero-image {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hero-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: var(--gradient-card);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(76, 175, 80, 0.2);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transform: translateX(100px);
    opacity: 0;
    animation: slideInRight 0.6s ease forwards;
}

/* Dynamic Tips Styles - Vertical Roulette */
.hero-tips-container {
    position: relative;
    width: 100%;
    height: 380px;
    /* Space for ~3 items */
    overflow: hidden;
    padding: 10px 0;
    /* Mask for smooth fade in/out at edges */
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
}

.tips-track {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    padding: 0 10px;
    /* Prevent shadow clip */
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.dynamic-tip {
    position: relative;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(76, 175, 80, 0.15);
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 100px;
    flex-shrink: 0;
    /* Prevent shrinking */
}

.dynamic-tip:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    border-color: var(--primary);
    z-index: 2;
}

.tip-icon-wrapper {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    color: white;
    /* White Icon */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.2);
}

.hero-card-content {
    flex: 1;
}

.hero-card-content h3 {
    font-size: 1rem;
    margin-bottom: 4px;
    color: var(--primary-dark);
}

.hero-card-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0;
}

/* Fade animation classes */
.fade-out {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.fade-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero-card:nth-child(1) {
    animation-delay: 0.3s;
}

.hero-card:nth-child(2) {
    animation-delay: 0.45s;
}

.hero-card:nth-child(3) {
    animation-delay: 0.6s;
}

.hero-card-icon {
    font-size: 2.5rem;
}

.hero-card-content h3 {
    font-size: 1.125rem;
    margin-bottom: 4px;
}

.hero-card-content p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ===================================================================
   VIDEOS SECTION
   =================================================================== */
.videos {
    background: var(--surface);
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding-bottom: 20px;
}


.video-card {
    background: var(--background);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.video-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    background: var(--primary-lighter);
    display: block;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(27, 94, 32, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-lg);
}

.play-button svg {
    width: 30px;
    height: 30px;
    color: white;
    margin-left: 4px;
}

.video-card:hover .play-button {
    background: var(--primary);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-info {
    padding: 20px;
}

.video-category {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary-lighter);
    color: var(--primary-dark);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    margin-bottom: 12px;
}

.video-info h3 {
    margin-bottom: 8px;
    line-height: 1.3;
}

.video-info p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.video-meta {
    display: flex;
    gap: 16px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ===================================================================
   BLOG SECTION
   =================================================================== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding-bottom: 20px;
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
}

.page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--primary-lighter);
    background: var(--surface);
    color: var(--primary-dark);
    font-weight: 700;
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.page-btn:hover:not(:disabled) {
    border-color: var(--primary);
    background: var(--primary-lighter);
    color: var(--primary-dark);
}

.page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #eee;
}

/* Responsive adjustment for blog grid if needed specifically */
@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

.blog-card {
    background: var(--surface);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Asegura que todas tengan la misma altura */
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.blog-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.blog-category {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 14px;
    background: var(--gradient-primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
}

.blog-content {
    padding: 24px;
}

.blog-meta {
    display: flex;
    gap: 16px;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.blog-content h3 {
    margin-bottom: 12px;
    line-height: 1.3;
}

.blog-content p {
    font-size: 0.9375rem;
    color: var(--text-light);
    margin-bottom: 16px;
    line-height: 1.6;
}

.blog-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: gap var(--transition-fast);
}

.blog-link:hover {
    gap: 12px;
}

.blog-link svg {
    transition: transform var(--transition-fast);
}

.blog-link:hover svg {
    transform: translateX(4px);
}

/* ===================================================================
   RESOURCES SECTION
   =================================================================== */
.resources {
    background: linear-gradient(180deg, var(--background) 0%, var(--primary-lighter) 100%);
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    padding-bottom: 20px;
}

.resource-card {
    display: flex;
    flex-direction: column;
    padding: 28px;
    background: var(--surface);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.resource-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.resource-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-lighter);
    color: var(--primary-dark);
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.resource-content {
    flex: 1;
    margin-bottom: 20px;
}

.resource-content h3 {
    font-size: 1.125rem;
    margin-bottom: 8px;
}

.resource-content p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.resource-meta {
    display: flex;
    gap: 16px;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 12px;
}

.resource-card .btn {
    margin-top: auto;
}

/* ===================================================================
   ABOUT SECTION
   =================================================================== */
.about {
    background: var(--surface);
}

.about-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-intro {
    font-size: 1.25rem;
    color: var(--text);
    font-weight: 500;
    margin-bottom: 20px;
}

.about-text {
    margin-bottom: 32px;
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 16px;
}

.about-values {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.value {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: var(--background);
    border-radius: var(--border-radius);
}

.value-icon {
    font-size: 2rem;
}

.value-content h4 {
    margin-bottom: 4px;
    color: var(--primary);
}

.value-content p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.about-image {
    display: flex;
    justify-content: center;
}

.about-card {
    text-align: center;
    padding: 40px;
    background: white;
    border: 1px solid rgba(76, 175, 80, 0.2);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
}

.about-logo-box {
    display: inline-block;
    padding: 20px 30px;
    background: #fbfaf6;
    border-radius: var(--border-radius);
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.about-logo-box img {
    width: 120px;
    height: 120px;
    object-fit: contain;
}

.about-card h3 {
    margin-bottom: 8px;
}

.about-brand-title {
    font-size: 1.75rem;
    font-weight: 800;
    text-align: center;
    line-height: 1.2;
}

.about-card>p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--primary-lighter);
    color: var(--primary-dark);
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.social-link.youtube:hover {
    background: #FF0000;
}

.social-link.instagram:hover {
    background: #E4405F;
}

.social-link.twitter:hover {
    background: #1DA1F2;
}

.social-link.tiktok:hover {
    background: #000000;
}

/* ===================================================================
   NEWSLETTER SECTION
   =================================================================== */
.newsletter {
    background: var(--gradient-hero);
    color: white;
    position: relative;
    overflow: hidden;
}

.newsletter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.newsletter-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.newsletter .section-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.newsletter h2 {
    color: white;
    margin-bottom: 16px;
}

.newsletter h2 .highlight {
    background: linear-gradient(135deg, #C8E6C9 0%, #81C784 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.newsletter-content p {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 24px;
}

.newsletter-benefits {
    list-style: none;
}

.newsletter-benefits li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    font-size: 0.9375rem;
}

.newsletter-benefits svg {
    color: var(--primary-light);
}

.newsletter-form-wrapper {
    background: var(--surface);
    padding: 40px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-dark);
}

.form-group input {
    padding: 16px 20px;
    font-family: var(--font-family);
    font-size: 1rem;
    border: 2px solid var(--primary-lighter);
    border-radius: var(--border-radius);
    outline: none;
    transition: all var(--transition-fast);
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.1);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-disclaimer {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.newsletter-success {
    display: none;
    text-align: center;
    padding: 40px 20px;
}

.newsletter-success.show {
    display: block;
}

.newsletter-success .success-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.newsletter-success h3 {
    margin-bottom: 8px;
}

.newsletter-success p {
    color: var(--text-muted);
}

/* ===================================================================
   FOOTER
   =================================================================== */
.footer {
    background: var(--primary-dark);
    color: white;
    padding: 80px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand .logo {
    margin-bottom: 20px;
}

.footer-brand .logo span {
    color: white;
}

.footer-brand>p {
    font-size: 0.875rem;
    opacity: 0.8;
    margin-bottom: 24px;
    line-height: 1.7;
}

.footer .social-links {
    justify-content: flex-start;
}

.footer .social-link {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.footer .social-link:hover {
    background: var(--primary);
}

.footer-links h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.875rem;
    opacity: 0.7;
}

/* ===================================================================
   ANIMATIONS
   =================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===================================================================
   RESPONSIVE DESIGN
   =================================================================== */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-image {
        order: -1;
    }


    .videos-grid {
        grid-template-columns: 1fr;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .blog-card.featured {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }

    .resources-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-wrapper,
    .newsletter-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-image {
        order: -1;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 60px;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 100px 24px 40px;
        background: var(--surface);
        box-shadow: var(--shadow-xl);
        transition: right var(--transition-normal);
        overflow-y: auto;
        /* Allow scrolling if menu is tall */
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu a {
        padding: 16px;
        font-size: 1.125rem;
    }

    .nav-toggle {
        display: flex;
        z-index: 1001;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 24px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .resources-grid {
        grid-template-columns: 1fr;
    }

    .newsletter-form-wrapper {
        padding: 24px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 480px) {
    .hero-card {
        padding: 16px;
    }

    .hero-card-icon {
        font-size: 2rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }
}

/* ===================================================================
   SUBSCRIPTION POPUP
   =================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.subscription-popup {
    background: var(--surface);
    padding: 40px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 450px;
    text-align: center;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-xl);
}

.modal-overlay.active .subscription-popup {
    transform: translateY(0);
}

.close-popup {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
}

.close-popup:hover {
    color: var(--primary);
}

.popup-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    display: block;
}

.subscription-popup h3 {
    color: var(--primary-dark);
    margin-bottom: 12px;
    font-size: 1.5rem;
}

.subscription-popup p {
    color: var(--text-muted);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.popup-form input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius-sm);
    margin-bottom: 12px;
    font-family: inherit;
    font-size: 1rem;
}

.popup-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.popup-note {
    font-size: 0.8rem !important;
    margin-top: 16px;
    margin-bottom: 0 !important;
    opacity: 0.8;
}

/* ===================================================================
   MOBILE RESPONSIVENESS (Optimized)
   =================================================================== */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    /* Hero Fixes */
    .hero {
        padding: 120px 0 60px;
        min-height: auto;
        text-align: center;
    }

    .hero .container {
        grid-template-columns: 1fr;
        /* Stack vertically */
        gap: 40px;
    }

    .hero-content {
        margin: 0 auto;
    }

    .hero-content h1 {
        font-size: 2.25rem;
        /* Smaller font for mobile */
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
        flex-wrap: wrap;
        gap: 20px;
    }

    /* Mobile Menu Fix for clicking links */
    .nav-menu.active a {
        padding: 12px;
        display: block;
        width: 100%;
        text-align: center;
    }
}

/* Animation for dynamic content */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Blog Optimizations */
.toc-container {
    background: #f8f9fa;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 40px;
    border-left: 4px solid var(--primary);
}

.toc-container h3 {
    margin-top: 0;
    font-size: 1.2rem;
    color: var(--primary-dark);
    margin-bottom: 15px;
}

.toc-container ul {
    margin-bottom: 0;
    padding-left: 20px;
}

.toc-container li {
    margin-bottom: 8px;
}

.toc-container a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
}

.toc-container a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.quick-tip {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 20px;
    border-radius: 8px;
    margin: 30px 0;
    display: flex;
    gap: 15px;
    align-items: start;
}

.quick-tip-icon {
    font-size: 1.5rem;
}

.quick-tip-content h4 {
    margin-top: 0;
    color: #1565c0;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.quick-tip-content p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

.embedded-cta {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    margin: 40px 0;
    box-shadow: 0 10px 20px rgba(76, 175, 80, 0.2);
}

.embedded-cta h3 {
    color: white !important;
    margin-top: 0;
    margin-bottom: 10px;
}

.embedded-cta p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
}

.embedded-cta .btn-light {
    background: white;
    color: var(--primary-dark);
    font-weight: 700;
    padding: 12px 30px;
    border-radius: 30px;
    display: inline-block;
    text-decoration: none;
    transition: transform 0.2s;
}

.embedded-cta .btn-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}