:root {
    /* --- Paleta de Colores Base --- */
    /* Orange (Default Primary) */
    --orange-500: #f97316;
    --orange-600: #ea580c;
    --orange-light-bg: rgba(249, 115, 22, 0.05);
    --orange-light-hover: rgba(249, 115, 22, 0.08);
    /* Fondo botones contacto */
    --orange-light-active: rgba(249, 115, 22, 0.12);
    /* Hover botones contacto */
    --orange-badge-bg: rgba(249, 115, 22, 0.1);
    --orange-shadow: rgba(249, 115, 22, 0.3);
    --orange-shadow-hover: rgba(249, 115, 22, 0.4);
    --orange-focus-ring: rgba(249, 115, 22, 0.1);

    /* Green (Dark Mode Primary / WhatsApp) */
    --green-500: #22c55e;
    --green-600: #16a34a;
    --green-light-bg: rgba(34, 197, 94, 0.05);
    --green-light-hover: rgba(34, 197, 94, 0.08);
    --green-light-active: rgba(34, 197, 94, 0.12);
    --green-badge-bg: rgba(34, 197, 94, 0.1);
    --green-shadow: rgba(34, 197, 94, 0.3);
    --green-shadow-hover: rgba(34, 197, 94, 0.4);
    --green-focus-ring: rgba(34, 197, 94, 0.2);

    /* Neutrals */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    /* Input bg light? */
    --gray-200: #e5e7eb;
    /* Border light */
    --gray-600: #4b5563;
    /* Bio text */
    --gray-700: #374151;
    /* Label text */
    --gray-800: #1f2937;
    /* Body text */
    --gray-900: #111827;
    /* Headings */

    --dark-bg-1: #111827;
    --dark-bg-2: #1f2937;
    --dark-card-bg: rgba(31, 41, 55, 0.4);
    --dark-input-bg: rgba(31, 41, 55, 0.6);

    /* --- TEMA ACTUAL (Variables Dinámicas) --- */
    /* Por defecto (Light Mode) asignamos los valores naranjas/claros */
    --accent-color: var(--orange-500);
    --accent-color-hover: var(--orange-600);
    --accent-shadow: var(--orange-shadow);
    --accent-shadow-hover: var(--orange-shadow-hover);

    --bg-gradient-start: var(--orange-light-bg);
    --bg-gradient-end: var(--green-light-bg);

    --text-main: var(--gray-800);
    --text-muted: var(--gray-600);
    --heading-color: var(--gray-900);

    --card-bg: rgba(255, 255, 255, 0.6);
    --card-border: rgba(255, 255, 255, 0.4);
    --card-hover-border: rgba(249, 115, 22, 0.3);
    /* Naranja clarito */

    --input-bg: #fff;
    /* Default input bg */
    --input-border: var(--gray-200);
    --input-text: inherit;
    --input-focus-border: var(--orange-500);
    --input-focus-ring: var(--orange-focus-ring);

    --contact-item-bg: var(--orange-light-hover);
    --contact-item-hover: var(--orange-light-active);
    --contact-link-color: var(--gray-600);

    --badge-bg: var(--orange-badge-bg);
    --badge-text: var(--orange-500);

    --toggle-bg: rgba(31, 41, 55, 0.9);
    --toggle-border: rgba(75, 85, 99, 0.5);
    --body-bg: #fafafa;
}

/* --- Dark Mode Override --- */
body.dark-mode {
    /* Cambiamos el acento a Verde */
    --accent-color: var(--green-500);
    --accent-color-hover: var(--green-600);
    --accent-shadow: var(--green-shadow);
    --accent-shadow-hover: var(--green-shadow-hover);

    /* Fondos oscuros */
    --bg-gradient-start: var(--dark-bg-1);
    --bg-gradient-end: var(--dark-bg-2);

    /* Texto claro */
    --text-main: var(--gray-200);
    --text-muted: #d1d5db;
    --heading-color: var(--gray-50);

    /* Cards */
    --card-bg: var(--dark-card-bg);
    --card-border: rgba(75, 85, 99, 0.3);
    --card-hover-border: rgba(34, 197, 94, 0.4);
    /* Verde hover */

    /* Inputs */
    --input-bg: var(--dark-input-bg);
    --input-border: rgba(75, 85, 99, 0.5);
    --input-text: var(--gray-50);
    --input-focus-border: var(--green-500);
    --input-focus-ring: var(--green-focus-ring);

    /* Contact Items */
    --contact-item-bg: var(--green-light-hover);
    --contact-item-hover: var(--green-light-active);
    --contact-link-color: #d1d5db;

    /* Badge */
    --badge-bg: var(--green-badge-bg);
    --badge-text: var(--green-500);

    /* Toggle */
    --toggle-bg: rgba(255, 255, 255, 0.9);
    --toggle-border: var(--gray-200);
    --body-bg: var(--dark-bg-1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background: var(--body-bg);
    transition: background 0.3s ease, color 0.3s ease;
    min-height: 100vh;
    overflow-y: auto;
}

/* (Las reglas específicas de body.dark-mode se eliminan porque ahora se manejan con las variables arriba) */
/* Solo mantenemos excepciones muy puntuales si las hubiera */

body.dark-mode .bio {
    color: var(--text-muted) !important;
}

body.dark-mode h1 {
    background: linear-gradient(110deg, #22c55e 0%, #22c55e 50%, #f97316 65%, #22c55e 82%, #f97316 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


/* ===== BACKGROUND ORBS ===== */
.bg-effects {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
}

.orb-1 {
    width: 700px;
    height: 500px;
    top: -200px;
    left: calc(50% - 350px);
    background: radial-gradient(ellipse, rgba(249, 115, 22, 0.20) 0%, transparent 70%);
    animation: orbFloat 10s ease-in-out infinite;
}

.orb-2 {
    width: 500px;
    height: 500px;
    top: 35%;
    left: -200px;
    background: radial-gradient(ellipse, rgba(249, 115, 22, 0.18) 0%, transparent 70%);
    animation: orbFloat 13s ease-in-out infinite;
    animation-delay: -4s;
}

.orb-3 {
    width: 500px;
    height: 500px;
    bottom: -150px;
    right: -150px;
    background: radial-gradient(ellipse, rgba(249, 115, 22, 0.14) 0%, transparent 70%);
    animation: orbFloat 11s ease-in-out infinite;
    animation-delay: -7s;
}

body.dark-mode .orb-1 {
    background: radial-gradient(ellipse, rgba(34, 197, 94, 0.11) 0%, transparent 70%);
}
body.dark-mode .orb-2 {
    background: radial-gradient(ellipse, rgba(34, 197, 94, 0.12) 0%, transparent 70%);
}
body.dark-mode .orb-3 {
    background: radial-gradient(ellipse, rgba(34, 197, 94, 0.08) 0%, transparent 70%);
}

@keyframes orbFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-40px) scale(1.04); }
}

/* ===== KEYFRAMES DE ENTRADA ===== */
@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gradientShift {
    0%   { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* ===== LOGO DEL CANAL EN HERO ===== */
.hero-channel-logo {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    margin: 0 auto 20px auto;
    display: block;
    object-fit: cover;
    border: 3px solid var(--accent-color);
    box-shadow: 0 0 0 6px rgba(249, 115, 22, 0.10), 0 10px 40px rgba(249, 115, 22, 0.20);
    animation: heroFadeIn 0.7s ease 0.1s forwards;
    opacity: 0;
}

body.dark-mode .hero-channel-logo {
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.15), 0 10px 40px rgba(34, 197, 94, 0.25);
}

/* ===== ACCESIBILIDAD: sin animaciones si el usuario lo prefiere ===== */
@media (prefers-reduced-motion: reduce) {
    .orb, .hero-channel-logo, .badge, h1, .subtitle, .bio, .content-section,
    .service-item, .section-title {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* --- Logo Zoho en Hero --- */
.zoho-logo-hero {
    display: block;
    margin: 0 auto 12px auto;
    height: 60px;
    width: auto;
}

.zoho-logo-dark {
    display: none;
}


/* Invertir logos según tema (esto se mantiene igual, es lógica de display) */
body.dark-mode .zoho-logo-light {
    display: none;
}

body.dark-mode .zoho-logo-dark {
    display: block;
}

/* --- Badge --- */
.badge {
    display: inline-block;
    padding: 8px 20px;
    background: var(--badge-bg);
    color: var(--badge-text);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
    animation: heroFadeIn 0.7s ease 0.2s forwards;
    opacity: 0;
}

/* --- Dark Mode Toggle --- */
.dark-mode-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    width: 52px;
    height: 52px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.dark-mode-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.dark-mode-toggle svg {
    position: absolute;
    transition: all 0.3s ease;
    color: #1f2937;
    stroke-width: 2.5;
}

.dark-mode-toggle .sun-icon {
    opacity: 1;
    transform: rotate(0deg);
}

.dark-mode-toggle .moon-icon {
    opacity: 0;
    transform: rotate(90deg);
}

body.dark-mode .dark-mode-toggle {
    background: rgba(31, 41, 55, 0.95);
    border-color: rgba(255, 255, 255, 0.2);
}

body.dark-mode .dark-mode-toggle svg {
    color: #f3f4f6;
}

body.dark-mode .dark-mode-toggle .sun-icon {
    opacity: 0;
    transform: rotate(90deg);
}

body.dark-mode .dark-mode-toggle .moon-icon {
    opacity: 1;
    transform: rotate(0deg);
}

/* WhatsApp Float Button (Siempre Verde) */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background: #25D366;
    /* WhatsApp brand color - fijo */
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
}

.whatsapp-float .whatsapp-icon {
    width: 40px;
    height: 40px;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.hero {
    padding: 30px 18px 18px;
    text-align: center;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--heading-color);
    background: linear-gradient(110deg, #f97316 0%, #f97316 50%, #22c55e 65%, #f97316 82%, #22c55e 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: heroFadeIn 0.7s ease 0.3s forwards, gradientShift 30s linear 1s infinite;
    opacity: 0;
}

h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--heading-color);
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-weight: 500;
    animation: heroFadeIn 0.7s ease 0.45s forwards;
    opacity: 0;
}

.bio {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
    animation: heroFadeIn 0.7s ease 0.6s forwards;
    opacity: 0;
}

/* Main Content Grid */
.main-content {
    padding: 16px 18px 24px;
    margin-top: -18px;
    flex: 1;
    display: flex;
    align-items: center;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.content-section {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    padding: 18px 16px;
    border-radius: 16px;
    border: 1px solid var(--card-border);
    border-top: 2px solid var(--accent-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    animation: heroFadeIn 0.8s ease forwards;
    opacity: 0;
}

.content-section:nth-child(1) { animation-delay: 0.7s; }
.content-section:nth-child(2) { animation-delay: 0.9s; }
.content-section:nth-child(3) { animation-delay: 1.1s; }

.content-section:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    border-color: var(--card-hover-border);
    border-top-color: var(--accent-color);
}

.section-icon {
    font-size: 50px;
    margin-bottom: 20px;
    display: block;
}

.section-logo {
    width: 50px;
    height: 50px;
    margin-bottom: 15px;
    object-fit: contain;
}

/* Channel Image */
.channel-image {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    margin: 12px auto 18px auto;
    object-fit: cover;
    border: 2px solid var(--accent-color);
    /* Usa la variable de acento (Naranja/Verde) */
    transition: all 0.3s ease;
}

.youtube-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    line-height: 1.5;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    width: 100%;
    text-align: center;
}

.btn-youtube {
    margin-top: auto;
    background: #FF0000;
    color: white;
    box-shadow: 0 8px 20px rgba(255, 0, 0, 0.3);
}

.btn-youtube:hover {
    background: #CC0000;
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(255, 0, 0, 0.4);
}

/* Contact Links */
.contact-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
    padding-top: 6px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--contact-item-bg);
    border-radius: 10px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    justify-content: space-between;
    /* To separate link and copy button */
    width: 100%;
    /* Ensure all items have the same width */
    min-height: 52px;
    /* Ensure all items have the same height */
}

.contact-item a {
    color: var(--contact-link-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    /* Take up available space */
}

/* Copy Button Styles */
.copy-btn {
    background-color: transparent;
    /* More explicit than 'background' shorthand */
    box-shadow: none;
    /* Remove any default button shadow */
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    color: var(--text-muted);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    /* Little gap from text */
}

.copy-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--accent-color);
    transform: scale(1.1);
}

body.dark-mode .copy-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.copy-btn svg {
    pointer-events: none;
    /* Let clicks pass through to button */
}

.contact-item:hover {
    background: var(--contact-item-hover);
    transform: translateX(3px);
}

/* YouTube link specific styling (optional, kept for compatibility if needed, but using vars) */
.contact-item.youtube-link {
    font-weight: 600;
}

/* Specific correction for WhatsApp icon (28px - slightly smaller) */
.contact-icon[src*="whatsapp.svg"] {
    width: 28px;
    height: 28px;
    margin: 0 2px;
    /* Small margin for visual balance */
}

/* Default styling for other icons (24px) */
.contact-icon {
    font-size: 18px;
    width: 24px;
    height: 24px;
    object-fit: contain;
    /* Add margin to center 24px icon within the same 32px space as WhatsApp */
    margin: 0 4px;
}

/* Ensure text is centered relative to icon */
.contact-item span {
    line-height: 1.2;
    display: block;
    /* Helps with vertical alignment calculation */
}

/* Form */
.form-group {
    margin-bottom: 12px;
}

label {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
    color: var(--text-main);
    /* Antes era gray-700 especifico, ahora main o variable */
    font-size: 0.85rem;
}

input,
textarea,
select {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid var(--input-border);
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--input-bg);
    color: var(--input-text);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--input-focus-border);
    box-shadow: 0 0 0 3px var(--input-focus-ring);
}

textarea {
    resize: vertical;
    min-height: 70px;
}

/* --- Botón de Enviar --- */
.btn-submit {
    background: var(--accent-color);
    color: white;
    font-weight: 600;
    box-shadow: 0 8px 20px var(--accent-shadow);
    margin-top: 8px;
}

.btn-submit:hover {
    background: var(--accent-color-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px var(--accent-shadow-hover);
}

/* --- Estilos para el mensaje de éxito del formulario --- */
#form-success-message {
    display: none;
    text-align: center;
    padding: 40px 0;
    animation: fadeIn 0.5s ease-in-out;
}

#form-success-message h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--accent-color);
    /* Adaptable a Naranja/Verde según tema */
}

/* Fill the success icon circle with the accent color */
#form-success-message .success-icon circle {
    fill: var(--accent-color);
    transition: fill 0.3s ease;
}

#form-success-message p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== YOUTUBE EMBED ===== */
.youtube-embed {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    margin-bottom: 12px;
}

.youtube-embed iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* ===== CHIPS DE TEMAS ===== */
.topic-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    flex: 1;
    align-content: flex-start;
}

.chip {
    display: inline-block;
    padding: 4px 12px;
    background: var(--badge-bg);
    color: var(--badge-text);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(249, 115, 22, 0.2);
    transition: all 0.2s ease;
}

body.dark-mode .chip {
    border-color: rgba(34, 197, 94, 0.2);
}

/* ===== SECCIÓN DE SERVICIOS ===== */
.services-section {
    padding: 8px 18px 32px;
}

.section-title {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--heading-color);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-title.reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.service-item {
    text-align: center;
    padding: 20px 12px;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.service-item.reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

.service-item.reveal-visible:hover {
    transform: translateY(-4px);
}

.service-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--badge-bg);
    border-radius: 12px;
    color: var(--accent-color);
}

.service-item h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--heading-color);
}

.service-item p {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
}

@media (max-width: 968px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* Footer */
footer {
    background: rgba(17, 24, 39, 0.95);
    color: #9ca3af;
    text-align: center;
    padding: 10px 16px;
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}


/* Responsive */
@media (max-width: 968px) {
    body {
        height: auto;
        overflow: auto;
    }

    .hero {
        padding: 80px 20px 30px;
    }

    .main-content {
        margin-top: -20px;
    }

    h1 {
        font-size: 2rem;
    }

    .content-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .main-content {
        padding: 20px;
    }

    .whatsapp-float {
        width: 55px;
        height: 55px;
        font-size: 28px;
        bottom: 15px;
        right: 15px;
    }

    /* Prevent iOS zoom on focus */
    input,
    textarea,
    select {
        font-size: 16px;
    }
}

html {
    scroll-behavior: smooth;
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* Estilo para el icono de éxito inline */
#form-success-message .success-icon {
    display: block;
    width: 60px;
    height: 60px;
    margin: 15px auto;
}