/* === BASE STYLES (DARK MODE - ORIGINAL) === */
body {
    font-family: 'Inter', sans-serif;
    background-color: #0f172a;
    /* slate-900 */
    color: #e2e8f0;
    /* slate-200 (default body text) */
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Site logo styling */
.site-logo {
    display: flex;
    align-items: center;
}

.site-logo .logo-image {
    height: 80px;
    /* Doubled from 40px to 80px */
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Responsive adjustment for smaller screens */
@media (max-width: 768px) {
    .site-logo .logo-image {
        height: 64px;
        /* Doubled from 32px to 64px */
    }
}

/* Light mode specific styling for logo */
body.light-mode .site-logo .logo-image {
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.1));
}

/* Section scroll margin adjustment to account for fixed navbar */
section[id] {
    scroll-margin-top: 100px;
    /* Valor que excede la altura de la barra de navegación con el logo más grande */
}

/* Media query for smaller screens with potentially different navbar height */
@media (max-width: 768px) {
    section[id] {
        scroll-margin-top: 80px;
        /* Valor ajustado para pantallas más pequeñas */
    }
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Poppins', sans-serif;
}

/* Default heading color for dark mode, can be overridden by utility classes */
h1,
h2,
h3:not(.text-blue-500):not(.text-purple-500):not(.text-white),
/* Exclude service card titles that have specific colors */
h4,
h5,
h6 {
    color: #ffffff;
}

/* Gradient Text Effects */
.gradient-text {
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    background-size: 100%;
    transition: background-image 0.5s ease;
    display: inline-block;
}

.gradient-text-main {
    background-image: linear-gradient(135deg, #60a5fa, #3b82f6, #2563eb);
    /* Gradiente azul para modo oscuro: blue-400 -> blue-500 -> blue-600 */
}

/* Estilos para animar los span dentro del texto con gradiente */
.gradient-text span {
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    background-image: inherit;
    display: inline-block;
}

/* Mantener animación reveal-text */
.reveal-text.gradient-text span {
    opacity: 0;
    transform: translateY(20px);
    animation: reveal 0.8s forwards;
}

/* Text Utility Classes (Dark Mode Defaults) */
.text-main-color {
    color: #ffffff;
}

/* For primary text like main titles */
.text-secondary-color {
    color: #cbd5e1;
    /* slate-300 - for descriptions, sub-text */
}

/* Text shadow for legibility in #about-me section during dark mode */
body:not(.light-mode) #about-me h2.text-main-color,
body:not(.light-mode) #about-me p.text-secondary-color {
    text-shadow: 0 2px 2px rgba(0, 0, 0, 0.89);
    /* Sombra oscura sutil */
}

/* Custom Scrollbar - Dark */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1e293b;
    /* slate-800 */
}

::-webkit-scrollbar-thumb {
    background: #475569;
    /* slate-600 */
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
    /* slate-500 */
}

/* Navigation - Dark Mode Defaults */
.nav-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out, backdrop-filter 0.3s ease;
}

.nav-default-bg {
    background-color: rgba(15, 23, 42, 0.45);
    /* Increased transparency */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    /* Subtle border */
}

.nav-scrolled-bg {
    background-color: rgba(15, 23, 42, 0.55);
    /* Still somewhat transparent when scrolled */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 20px -1px rgba(0, 0, 0, 0.2), 0 2px 10px -1px rgba(0, 0, 0, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

/* Nav links are white by default via Tailwind's text-white on FMG Edits, and direct styling on others */
#navbar nav a {
    color: #e2e8f0;
    /* slate-200 */
}

/* Default nav link color */
#navbar nav a:hover {
    color: #60a5fa;
    /* blue-400 */
}

#navbar nav a.bg-blue-600 {
    color: #ffffff;
}

/* Contact button text */

#mobile-menu {
    background-color: rgba(30, 41, 59, 0.95);
    /* slate-800/95 */
}

#mobile-menu a {
    color: #e2e8f0;
}

#mobile-menu a:hover {
    background-color: #334155;
    /* slate-700 */
}

#mobile-menu a.bg-blue-600 {
    color: #ffffff;
}

#theme-toggle,
#theme-toggle-mobile {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    color: #94a3b8;
    /* slate-400 */
    transition: color 0.3s ease;
}

#theme-toggle:hover,
#theme-toggle-mobile:hover {
    color: #e2e8f0;
    /* slate-200 */
}

#mobile-menu-button svg {
    stroke: #e2e8f0;
    /* slate-200 */
}

/* Site logo/title styling - always visible on both themes */
#navbar .text-white {
    color: #ffffff;
    /* Blanco para modo oscuro (ya está por defecto en .text-white) */
    transition: color 0.3s ease;
}

/* Hero Animation (Theme-agnostic) */
.reveal-text span {
    opacity: 0;
    transform: translateY(20px);
    display: inline-block;
    animation: reveal 0.8s forwards;
}

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

.pulse-button {
    animation: pulse 2s infinite;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
}

.pulse-button:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af) !important;
}

body.light-mode .pulse-button {
    background: linear-gradient(135deg, #2563eb, #1e40af) !important;
}

body.light-mode .pulse-button:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e3a8a) !important;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

/* Section Backgrounds - Dark Mode Defaults */
.section-bg-dark {
    background-color: #1e293b;
    /* slate-800 */
}

.section-bg-darker {
    background-color: #0f172a;
    /* slate-900 */
}

/* Hero section has its own gradient background, which is its dark mode default */
#hero {
    background-image: linear-gradient(to bottom right, #0f172a, #1e293b, #2563eb);
    position: relative;
    overflow: hidden;
    /* Para contener los elementos animados dentro del hero */
}

/* Hero Animation Background */
.hero-area {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* Para que no interfiera con los clicks */
}

.hero-circles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.hero-circles li {
    position: absolute;
    display: block;
    list-style: none;
    width: 20px;
    height: 20px;
    background: rgba(109, 173, 250, 0.281);
    /* blue-400 con baja opacidad */
    animation: hero-animate 25s linear infinite;
    bottom: -150px;
    border-radius: 50%;
}

.hero-circles li:nth-child(1) {
    left: 25%;
    width: 80px;
    height: 80px;
    animation-delay: 0s;
}

.hero-circles li:nth-child(2) {
    left: 10%;
    width: 20px;
    height: 20px;
    animation-delay: 2s;
    animation-duration: 12s;
}

.hero-circles li:nth-child(3) {
    left: 70%;
    width: 20px;
    height: 20px;
    animation-delay: 4s;
}

.hero-circles li:nth-child(4) {
    left: 40%;
    width: 60px;
    height: 60px;
    animation-delay: 0s;
    animation-duration: 18s;
}

.hero-circles li:nth-child(5) {
    left: 65%;
    width: 20px;
    height: 20px;
    animation-delay: 0s;
}

.hero-circles li:nth-child(6) {
    left: 75%;
    width: 110px;
    height: 110px;
    animation-delay: 3s;
}

.hero-circles li:nth-child(7) {
    left: 35%;
    width: 150px;
    height: 150px;
    animation-delay: 7s;
}

.hero-circles li:nth-child(8) {
    left: 50%;
    width: 25px;
    height: 25px;
    animation-delay: 15s;
    animation-duration: 45s;
}

.hero-circles li:nth-child(9) {
    left: 20%;
    width: 15px;
    height: 15px;
    animation-delay: 2s;
    animation-duration: 35s;
}

.hero-circles li:nth-child(10) {
    left: 85%;
    width: 150px;
    height: 150px;
    animation-delay: 0s;
    animation-duration: 11s;
}

@keyframes hero-animate {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
        border-radius: 30%;
    }

    100% {
        transform: translateY(-1000px) rotate(720deg);
        opacity: 0;
        border-radius: 50%;
    }
}

/* Hero subtitle */

/* Card Backgrounds - Dark Mode Defaults */
.content-card-bg {
    background-color: #334155;
    /* slate-700 */
}

/* For portfolio items, contact form card */
.service-card-default-bg {
    background-color: #1e293b;
    /* slate-800 */
}

/* For Básico, Premium service cards */
/* Estándar service card (.card-bg-accent) uses Tailwind bg-blue-700, text-white for dark mode */
.about-image-placeholder {
    /* Dark Mode Default */
    background-color: #2563eb;
    /* blue-600 */
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem auto;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    position: relative;
    /* Añadido para el efecto de borde difuminado */
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

/* Efecto de borde difuminado mejorado para mayor contraste */
.about-image-placeholder::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.3),
        0 0 25px 8px rgba(255, 255, 255, 0.25);
    z-index: 1;
    pointer-events: none;
}

/* Efecto hover para acercamiento */
.about-image-placeholder:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
}

/* Efecto al pasar el mouse sobre la imagen */
.about-image-placeholder:hover .profile-image {
    transform: scale(1.15);
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
    /* Suaviza el efecto de zoom */
}

/* Adaptar el efecto difuminado para modo claro */
body.light-mode .about-image-placeholder::after {
    box-shadow: inset 0 0 0 2px rgba(15, 23, 42, 0.15),
        0 0 25px 8px rgba(59, 130, 246, 0.2);
}

/* Estilos mejorados para la etiqueta "Popular" */
.card-bg-accent .absolute {
    transform-origin: top right;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    padding-top: 6px;
    /* Aumenta el padding superior */
}

/* Asegurar que la etiqueta se muestre en modo claro también */
body.light-mode .card-bg-accent .absolute {
    background-color: #eab308;
    /* yellow-500 para más contraste en modo claro */
    color: #1e293b;
    /* slate-800 */
}

/* Agregar efecto hover para mejorar la interactividad */
.card-bg-accent:hover .absolute {
    transform: rotate(3deg) scale(1.05);
    transition: transform 0.3s ease;
}

/* Form Inputs - Dark Mode Defaults */
.form-input-bg {
    background-color: #475569;
    /* slate-600 */
    border: 1px solid #64748b;
    /* slate-500 */
    color: #f8fafc;
    /* slate-50 */
}

.form-input-bg::placeholder {
    color: #94a3b8;
    /* slate-400 */
}

/* Modal - Dark Mode Defaults */
.glassmorphism-bg {
    background: rgba(30, 41, 59, 0.5);
    /* slate-800 with opacity */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(51, 65, 85, 0.5);
    /* slate-700 with opacity */
}

.modal-text-content {
    color: #e2e8f0;
    /* slate-200 */
}

/* Modal title and description */
#videoModal .close-button {
    color: #9ca3af;
    /* gray-400 */
}

/* Modal close X */
#videoModal .close-button:hover {
    color: #ffffff;
}

/* Footer - Dark Mode Default */
footer {
    color: #94a3b8;
    /* slate-400 */
}

/* Instagram Embed Styles */
.instagram-card {
    display: flex;
    flex-direction: column;
    max-width: 540px;
    margin: 0 auto;
    overflow: hidden;
    height: 100%;
}

.instagram-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 0.75rem 0.75rem 0 0;
    background: #000;
}

.instagram-wrapper .instagram-media {
    margin: 0 !important;
    min-width: 100% !important;
    width: 100% !important;
    height: 100%;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* Hide unwanted Instagram elements */
.instagram-wrapper .instagram-media div[style*="padding: 19% 0"] {
    padding: 0 !important;
}

.instagram-wrapper .instagram-media div[style*="padding-top: 8px"] {
    display: none !important;
}

.instagram-wrapper .instagram-media div[style*="display: flex; flex-direction: column; flex-grow: 1;"] {
    display: none !important;
}

.instagram-wrapper .instagram-media p[style*="margin-bottom:0; margin-top:8px;"] {
    display: none !important;
}

/* Set proper aspect ratio */
.instagram-aspect-ratio {
    position: relative;
    padding-bottom: 125%;
    /* Aspect ratio for Instagram reels/posts */
    height: 0;
    overflow: hidden;
}

.instagram-aspect-ratio iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Additional tweaks for dark/light modes */
body.light-mode .instagram-card {
    background: #fff;
}

body.dark-mode .instagram-card {
    background: #1e293b;
}

/* TikTok Embed Styles */
.tiktok-card {
    display: flex;
    flex-direction: column;
    max-width: 540px;
    margin: 0 auto;
    overflow: hidden;
    height: 100%;
}

.tiktok-wrapper {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 0.75rem 0.75rem 0 0;
    background: #000;
    /* Fondo negro mientras carga */
}

.tiktok-aspect-ratio {
    position: relative;
    padding-bottom: 177.77%;
    /* Aspect ratio para TikTok */
    height: 0;
    overflow: hidden;
}

.tiktok-aspect-ratio .tiktok-embed {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    min-width: unset !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Custom styling for TikTok embeds */
.tiktok-embed {
    margin: 0 !important;
    max-width: 100% !important;
    border: none !important;
    background: transparent !important;
}

/* Para que se vea mejor en modo oscuro */
.tiktok-embed[data-theme="dark"] {
    background-color: #000 !important;
}

/* Garantizar que la sección dentro del embed de TikTok sea visible */
.tiktok-embed section {
    min-height: 50px;
}

/* Estilo para evitar que el contenido del iframe rompa el layout */
.tiktok-embed iframe {
    width: 100% !important;
    border: none !important;
    display: block !important;
}

/* Additional tweaks for dark/light modes */
body.light-mode .tiktok-card {
    background: #fff;
}

body.dark-mode .tiktok-card {
    background: #1e293b;
}

/* === LOGOS MARQUEE SECTION === */
.logos-container {
    width: 100%;
    padding: 20px 0;
}

.logos-scroll {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-bottom: 30px;
    padding: 20px 0;
}

/* Fade effect for logo marquee */
.logos-scroll::before,
.logos-scroll::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    /* Adjust width of the fade effect as needed */
    z-index: 2;
    /* Ensure fade is above logos */
    pointer-events: none;
    /* Allow clicks to pass through */
}

.logos-scroll::before {
    left: 0;
    /* Dark mode gradient: from section background to transparent */
    background: linear-gradient(to right, #0f172a, rgba(15, 23, 42, 0));
}

.logos-scroll::after {
    right: 0;
    /* Dark mode gradient: from transparent to section background */
    background: linear-gradient(to left, #0f172a, rgba(15, 23, 42, 0));
}

.logos-track {
    display: flex;
    width: max-content;
    animation-duration: 45s;
    /* Aumentado de 30s a 45s para más logos */
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.logos-left .logos-track {
    animation-name: scroll-left;
}

.logos-right .logos-track {
    animation-name: scroll-right;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@keyframes scroll-right {
    0% {
        transform: translateX(-50%);
    }

    100% {
        transform: translateX(0);
    }
}

.logo-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 180px;
    /* Reducido de 200px a 160px para acomodar más logos */
    padding: 0 15px;
    /* Reducido de 20px a 15px */
}

/* Añadimos estilos para las imágenes de logos */
.logo-image {
    max-width: 100%;
    height: auto;
    transition: filter 0.3s ease;
}

/* Iluminación para logos SOLO en modo oscuro */
body:not(.light-mode) .logo-image {
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.705));
}

/* Efecto hover para los logos en modo oscuro */
body:not(.light-mode) .logo-item:hover .logo-image {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.925));
    transform: scale(1.05);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.logo-placeholder {
    width: 100%;
    height: 100px;
    background-color: #475569;
    /* slate-600 */
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
}

.logo-placeholder::before {
    content: "Logo";
    color: #94a3b8;
    /* slate-400 */
    font-size: 1rem;
    font-weight: bold;
}

.logo-placeholder:hover {
    transform: scale(1.05);
    background-color: #334155;
    /* slate-700 */
}

/* Light mode overrides */
body.light-mode .logo-placeholder {
    background-color: #e2e8f0;
    /* slate-200 */
}

body.light-mode .logo-placeholder::before {
    color: #64748b;
    /* slate-500 */
}

body.light-mode .logo-placeholder:hover {
    background-color: #cbd5e1;
    /* slate-300 */
}

/* Light mode overrides for logo marquee fade */
body.light-mode .logos-scroll::before {
    background: linear-gradient(to right, #f8fafc, rgba(248, 250, 252, 0));
}

body.light-mode .logos-scroll::after {
    background: linear-gradient(to left, #f8fafc, rgba(248, 250, 252, 0));
}

/* === LIGHT MODE OVERRIDES === */
body.light-mode {
    background-color: #f1f5f9;
    /* slate-100 */
    color: #0f172a;
    /* slate-900 (default body text) */
}

body.light-mode h1,
body.light-mode h2,
body.light-mode h3:not(.text-blue-500):not(.text-purple-500):not(.text-white),
body.light-mode h4,
body.light-mode h5,
body.light-mode h6 {
    color: #1e293b;
    /* slate-800 */
}

body.light-mode .text-main-color {
    color: #1e293b;
    /* slate-800 */
}

body.light-mode .text-secondary-color {
    color: #475569;
    /* slate-600 */
}

body.light-mode ::-webkit-scrollbar-track {
    background: #e2e8f0;
    /* slate-200 */
}

body.light-mode ::-webkit-scrollbar-thumb {
    background: #94a3b8;
    /* slate-400 */
}

body.light-mode ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
    /* slate-500 */
}

body.light-mode .nav-default-bg {
    background-color: rgba(241, 245, 249, 0.45);
    /* Increased transparency */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    /* Subtle border */
}

body.light-mode .nav-scrolled-bg {
    background-color: rgba(241, 245, 249, 0.55);
    /* Still somewhat transparent when scrolled */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 20px -1px rgba(0, 0, 0, 0.07), 0 2px 10px -1px rgba(0, 0, 0, 0.04);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-mode #navbar nav a {
    color: #1e293b;
    /* slate-800 */
}

body.light-mode #navbar nav a:hover {
    color: #2563eb;
    /* blue-600 */
}

body.light-mode #navbar nav a.bg-blue-600 {
    background-color: #2563eb;
    color: #f1f5f9;
}

body.light-mode #navbar nav a.bg-blue-600:hover {
    background-color: #1d4ed8;
}

body.light-mode #mobile-menu {
    background-color: rgba(226, 232, 240, 0.95);
    /* slate-200/95 */
}

body.light-mode #mobile-menu a {
    color: #1e293b;
}

body.light-mode #mobile-menu a:hover {
    background-color: #d1d5db;
    /* gray-300 */
}

body.light-mode #mobile-menu a.bg-blue-600 {
    background-color: #2563eb;
    color: #f1f5f9;
}

body.light-mode #mobile-menu a.bg-blue-600:hover {
    background-color: #1d4ed8;
}

body.light-mode #theme-toggle,
body.light-mode #theme-toggle-mobile {
    color: #475569;
    /* slate-600 */
}

body.light-mode #theme-toggle:hover,
body.light-mode #theme-toggle-mobile:hover {
    color: #0f172a;
    /* slate-900 */
}

body.light-mode #mobile-menu-button svg {
    stroke: #1e293b;
    /* slate-800 */
}

body.light-mode .section-bg-dark {
    background-color: #e2e8f0;
    /* slate-200 */
}

body.light-mode .section-bg-darker {
    background-color: #f8fafc;
    /* slate-50 */
}

body.light-mode #hero {
    background-image: linear-gradient(to bottom right, #e0e7ff, #c7d2fe, #a5b4fc);
}

body.light-mode .hero-circles li {
    background: rgba(59, 131, 246, 0.199);
    /* blue-500 con baja opacidad para modo claro */
}

body.light-mode #hero .text-slate-300 {
    color: #475569;
    /* slate-600 */
}

body.light-mode .content-card-bg,
body.light-mode .service-card-default-bg {
    background-color: #ffffff;
    /* white */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    /* Softer shadow */
}

body.light-mode .card-bg-accent {
    /* Estándar service card */
    background-color: #3b82f6;
    /* blue-500 */
    color: #f1f5f9;
    /* slate-100 */
}

body.light-mode .card-bg-accent .text-slate-200 {
    color: #e0e7ff;
}

body.light-mode .card-bg-accent .text-yellow-300 {
    color: #facc15;
}

body.light-mode .about-image-placeholder {
    background-color: #3b82f6;
    color: #f1f5f9;
}

body.light-mode .form-input-bg {
    background-color: #f8fafc;
    /* slate-50 */
    border-color: #cbd5e1;
    /* slate-300 */
    color: #0f172a;
    /* slate-900 */
}

body.light-mode .form-input-bg::placeholder {
    color: #94a3b8;
    /* slate-400 */
}

body.light-mode .form-input-bg:focus {
    border-color: #2563eb;
}

body.light-mode .glassmorphism-bg {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(226, 232, 240, 0.7);
}

body.light-mode .modal-text-content {
    color: #1f2937;
    /* slate-800 */
}

body.light-mode #videoModal .close-button {
    color: #4b5563;
    /* gray-600 */
}

body.light-mode #videoModal .close-button:hover {
    color: #1f2937;
}

body.light-mode footer {
    color: #475569;
    /* slate-600 */
}

body.light-mode #navbar .text-white {
    color: #1e293b;
    /* slate-800 para mejor visibilidad en modo claro */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    /* Sombra sutil para mejorar legibilidad */
}

body.light-mode .gradient-text-main {
    background-image: linear-gradient(135deg, #3b82f6, #2563eb, #1e40af);
    /* Gradiente azul para modo claro: blue-500 -> blue-600 -> blue-800 */
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

/* Remove text shadow in light mode if it was applied through a more general rule, ensuring specificity */
body.light-mode #about-me h2.text-main-color,
body.light-mode #about-me p.text-secondary-color {
    text-shadow: none;
}

/* === GRADIENT ANIMATION FOR CONTACT TITLE (DARK MODE ONLY) === */
@property --color-1 {
    syntax: "<color>";
    inherits: false;
    initial-value: hsl(98 100% 62%);
    /* Initial: Bright Green/Yellow */
}

@property --color-2 {
    syntax: "<color>";
    inherits: false;
    initial-value: hsl(204 100% 59%);
    /* Initial: Bright Blue */
}

@keyframes contact-title-gradient-change {
    to {
        --color-1: hsl(210 100% 59%);
        /* Animated to: Different Blue */
        --color-2: hsl(310 100% 59%);
        /* Animated to: Bright Pink/Purple */
    }
}

/* Apply effect to the H2 title in the contact section only in dark mode */
body:not(.light-mode) #contact h2.text-main-color {
    animation: contact-title-gradient-change 2s linear infinite alternate;
    background: linear-gradient(to right in oklch, var(--color-1), var(--color-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    /* Fallback for browsers not supporting -webkit-text-fill-color fully */
}

/* Reset styles for light mode to ensure no gradient animation */
body.light-mode #contact h2.text-main-color {
    background-image: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    -webkit-text-fill-color: initial;
    /* The actual text color for light mode will be handled by existing .text-main-color rules */
    color: inherit;
    /* Or let body.light-mode .text-main-color rule apply */
}

/* Add transition for background color to the contact section */
#contact {
    transition: background-color 0.5s ease;
}

/* === SOCIAL MEDIA ICONS FOR CONTACT SECTION === */
#contact .sci {
    position: relative;
    display: flex;
    justify-content: center;
    /* Center the icons */
    align-items: center;
    /* Align items vertically */
    flex-wrap: wrap;
    /* Allow wrapping on smaller screens */
    gap: 30px;
    /* Adjusted gap for responsiveness */
    padding-top: 20px;
    /* Add some space above the icons */
}

#contact .sci li {
    list-style: none;
}

#contact .sci li a {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 120px;
    /* Adjusted size for better fit */
    height: 120px;
    /* Adjusted size for better fit */
    font-size: 3em;
    /* Adjusted icon size */
    text-decoration: none;
    border-radius: 10px;
    transform-style: preserve-3d;
    transition: background 0.25s, box-shadow 0.25s, border 0.25s;
}

#contact .sci li a i {
    transition: 0.5s;
    pointer-events: none;
}

#contact .sci li a:hover i {
    transform: scale(1.4) translateZ(40px);
    /* Adjusted scale and Z */
    color: #fff;
}

/* Default (Light Mode) Icon Styles */
body.light-mode #contact .sci li a {
    background: #ffffff;
    /* White background for light mode */
    color: #333333;
    /* Dark icon color for light mode */
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.1);
    /* Softer shadow for light mode */
}

body.light-mode #contact .sci li a:hover {
    background: var(--clr);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.2);
    /* Slightly stronger shadow on hover */
    border: 4px solid var(--clr);
}

/* Dark Mode Icon Styles */
body:not(.light-mode) #contact .sci li a {
    background: #1e293b;
    /* slate-800, darker background for dark mode */
    color: #e2e8f0;
    /* slate-200, light icon color for dark mode */
    box-shadow: 0 25px 35px rgba(0, 0, 0, 0.4);
    /* Stronger shadow for dark mode */
}

body:not(.light-mode) #contact .sci li a:hover {
    background: var(--clr);
    box-shadow: 0 30px 40px rgba(0, 0, 0, 0.5);
    /* Even stronger shadow on hover in dark mode */
    border: 5px solid var(--clr);
}

/* === RIPPLE BACKGROUND ANIMATION FOR ABOUT ME SECTION === */
#about-me {
    position: relative;
    /* Needed to contain absolute positioned children */
    overflow: hidden;
    /* Ensures circles don't overflow the section */
}

.ripple-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* Below the content container which has z-10 */
    pointer-events: none;
}

.circle {
    position: absolute;
    border-radius: 50%;
    animation: ripple 15s infinite;
    /* Default for Dark Mode */
    background: white;
    box-shadow: 0px 0px 1px 0px #508fb9;
    /* Blueish shadow as per example */
}

.small {
    width: 200px;
    height: 200px;
    left: -100px;
    bottom: -100px;
}

.medium {
    width: 400px;
    height: 400px;
    left: -200px;
    bottom: -200px;
}

.large {
    width: 600px;
    height: 600px;
    left: -300px;
    bottom: -300px;
}

.xlarge {
    width: 800px;
    height: 800px;
    left: -400px;
    bottom: -400px;
}

.xxlarge {
    width: 1000px;
    height: 1000px;
    left: -500px;
    bottom: -500px;
}

/* Opacities for Dark Mode (as per example) */
.shade1 {
    opacity: 0.2;
}

.shade2 {
    opacity: 0.5;
}

.shade3 {
    opacity: 0.7;
}

.shade4 {
    opacity: 0.8;
}

.shade5 {
    opacity: 0.9;
}

@keyframes ripple {
    0% {
        transform: scale(0.8);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(0.8);
    }
}

/* Light Mode Overrides for Ripple Animation */
body.light-mode .circle {
    background: #3b82f6;
    /* Blue color for light mode (blue-500) */
    box-shadow: 0px 0px 1px 0px #2563eb;
    /* Darker blue shadow (blue-600) */
}

/* Adjusted opacities for Light Mode for better subtlety */
body.light-mode .shade1 {
    opacity: 0.05;
}

body.light-mode .shade2 {
    opacity: 0.08;
}

body.light-mode .shade3 {
    opacity: 0.1;
}

body.light-mode .shade4 {
    opacity: 0.12;
}

body.light-mode .shade5 {
    opacity: 0.15;
}

/* === CUBE BACKGROUND ANIMATION FOR SERVICES SECTION === */
#services {
    position: relative;
    /* Needed to contain absolute positioned children */
    overflow: hidden;
    /* Ensures cubes don't overflow the section */
}

.cube-animation-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* Below the content container which has z-10 */
    pointer-events: none;
    /* Animation should not interfere with mouse events */
}

.cube {
    position: absolute;
    top: 80vh;
    /* Default initial position */
    left: 45vw;
    /* Default initial position */
    width: 10px;
    height: 10px;
    /* Adjusted border color for dark mode - subtle blue */
    border: solid 1px rgba(59, 130, 246, 0.2);
    /* e.g., blue-500 with low opacity */
    transform-origin: top left;
    transform: scale(0) rotate(0deg) translate(-50%, -50%);
    animation: cube-effect 12s ease-in forwards infinite;
}

/* Alternate border color for every other cube in dark mode */
#services .cube:nth-child(2n) {
    border-color: rgba(96, 165, 250, 0.3);
    /* e.g., blue-400 with slightly higher opacity */
}

#services .cube:nth-child(2) {
    animation-delay: 2s;
    left: 25vw;
    top: 40vh;
}

#services .cube:nth-child(3) {
    animation-delay: 4s;
    left: 75vw;
    top: 50vh;
}

#services .cube:nth-child(4) {
    animation-delay: 6s;
    left: 90vw;
    top: 10vh;
}

#services .cube:nth-child(5) {
    animation-delay: 8s;
    left: 10vw;
    top: 85vh;
}

#services .cube:nth-child(6) {
    animation-delay: 10s;
    left: 50vw;
    top: 10vh;
}

/* Cubes 7-12 will use default positions and 0s animation-delay */

@keyframes cube-effect {
    from {
        transform: scale(0) rotate(0deg) translate(-50%, -50%);
        opacity: 1;
    }

    to {
        transform: scale(20) rotate(960deg) translate(-50%, -50%);
        opacity: 0;
    }
}

/* === BOTÓN DE REGRESO ARRIBA === */
.scroll-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.7);
    /* blue-600 con transparencia */
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.scroll-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top-btn:hover {
    background: rgba(37, 99, 235, 0.9);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(-3px);
}

.scroll-to-top-btn:active {
    transform: translateY(1px);
}

/* Estilos para modo claro */
body.light-mode .scroll-to-top-btn {
    background: rgba(59, 130, 246, 0.7);
    /* blue-500 con transparencia */
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

body.light-mode .scroll-to-top-btn:hover {
    background: rgba(59, 130, 246, 0.9);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}