/**
 * Nazario Code - www.nazariocode.com
 * Estilos personalizados (retoques sobre Tailwind)
 */

@font-face {
  font-family: 'Montserrat';
  src: url('assets/fonts/Montserrat-Variable.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: 'PressStart2P';
  src: url('assets/fonts/PressStart2P-Regular.ttf') format('truetype');
  font-display: swap;
}

.font-brand {
  font-family: 'PressStart2P', cursive;
  text-transform: uppercase;
  letter-spacing: -0.05em;
}

/* Scroll suave global */
html {
  scroll-behavior: smooth;
}

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

::-webkit-scrollbar-track {
  background: #0f0f12;
}

::-webkit-scrollbar-thumb {
  background: #e10600;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #ff1a1a;
}

/* Focus visible accesible */
:focus-visible {
  outline: 2px solid #e10600;
  outline-offset: 2px;
}

/* Selection */
::selection {
  background: rgba(225, 6, 0, 0.3);
  color: #fff;
}

/* Textos grises más visibles en modo oscuro */
/* Subtítulos y descripciones */
#hero .text-gray-400,
#servicios .text-gray-400,
#portafolio .text-gray-400,
#testimonios .text-gray-400,
#sobre-mi .text-gray-400,
#contacto .text-gray-400,
footer .text-gray-400 {
  color: #b0b8c4 !important;
}

/* Textos dentro de cards */
.testimonial-card .text-white\/60,
.testimonial-card .text-white\/80 {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* Nav links más visibles */
.nav-link {
  color: #c9d1d9 !important;
}

#mobile-menu .text-gray-400 {
  color: #c9d1d9 !important;
}

/* Nav link hover */
.nav-link:hover {
  color: rgb(var(--accent-color));
}

/* Botones con color de acento - texto según tema */
/* Modo oscuro (dorado): texto negro */
.btn-primary,
button[type="submit"],
.testimonial-carousel-btn {
  color: #000000 !important;
}

/* Modo claro (rojo): texto blanco */
[data-theme="light"] .btn-primary,
[data-theme="light"] button[type="submit"] {
  color: #ffffff !important;
}

/* Carrusel: con separación entre slides */
.testimonials-track {
  gap: 24px;
}

/* Testimonial carousel buttons - modo oscuro */
.testimonial-carousel-btn {
  background-color: #18181d;
  border-color: #2a2a32;
  color: #ffffff;
}

.testimonial-carousel-btn:hover {
  background-color: #2a2a32;
  border-color: #e10600;
}

/* Testimonial carousel buttons - modo claro */
[data-theme="light"] .testimonial-carousel-btn {
  background-color: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #1e293b !important;
}

[data-theme="light"] .testimonial-carousel-btn:hover {
  background-color: #e2e8f0 !important;
  border-color: #e10600 !important;
}

/* Testimonial fade effects - mantener oscuros en modo claro */
.testimonial-fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 240px;
  pointer-events: none;
  z-index: 10;
}

.testimonial-fade--left {
  left: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 100%);
}

.testimonial-fade--right {
  right: 0;
  background: linear-gradient(to left, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 100%);
}

/* Fades en modo claro - de blanco a transparente */
[data-theme="light"] .testimonial-fade--left {
  background: linear-gradient(to right, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%) !important;
}

[data-theme="light"] .testimonial-fade--right {
  background: linear-gradient(to left, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%) !important;
}

/* Fondo blanco general en modo claro para TODAS las secciones */
[data-theme="light"] body,
[data-theme="light"] main,
[data-theme="light"] .bg-dark,
[data-theme="light"] .bg-black,
[data-theme="light"] .bg-palette-black,
[data-theme="light"] section {
  background-color: #ffffff !important;
}

[data-theme="light"] #servicios .text-white,
[data-theme="light"] #testimonios .text-white {
  color: #1e293b !important;
}

[data-theme="light"] #servicios .text-gray-400,
[data-theme="light"] #testimonios .text-gray-400 {
  color: #64748b !important;
}

/* Asegurar que el footer de testimonial cards no tenga fondo oscuro en modo claro */
[data-theme="light"] .testimonial-card-footer,
[data-theme="light"] .testimonial-card footer {
  background-color: transparent !important;
  background: transparent !important;
}

/* Los cards de colores mantienen sus colores en modo claro */
[data-theme="light"] .testimonial-card,
[data-theme="light"] .service-card,
[data-theme="light"] .portfolio-item,
[data-theme="light"] .sobre-mi-card {
  /* No forzar fondo blanco, dejar que randomizeColors maneje los colores */
}

/* Sobre mí en modo claro - fondo blanco, título oscuro */
[data-theme="light"] #sobre-mi {
  background-color: #ffffff !important;
}

[data-theme="light"] #sobre-mi > div > div:first-child .text-white {
  color: #000000 !important;
}

[data-theme="light"] #sobre-mi > div > div:first-child .text-gray-400 {
  color: #4b5563 !important;
  font-weight: 500 !important;
}

/* Pero el card sobre-mi mantiene texto blanco */
[data-theme="light"] .sobre-mi-card .text-white,
[data-theme="light"] .sobre-mi-card h3,
[data-theme="light"] .sobre-mi-card p,
[data-theme="light"] .sobre-mi-card strong {
  color: inherit !important;
}

/* Estilos generales para modo claro */
[data-theme="light"] {
  background-color: #ffffff;
}

[data-theme="light"] body {
  background-color: #ffffff;
  color: #1e293b;
}

[data-theme="light"] .bg-dark {
  background-color: #ffffff;
}

[data-theme="light"] .text-gray-100 {
  color: #1e293b;
}

[data-theme="light"] .text-gray-300 {
  color: #475569;
}

[data-theme="light"] .text-gray-400 {
  color: #4b5563 !important;
  font-weight: 500 !important;
}

/* Textos de acento en modo claro - más oscuros */
[data-theme="light"] .text-accent {
  font-weight: 600 !important;
}

[data-theme="light"] .text-gray-500 {
  color: #94a3b8;
}

[data-theme="light"] nav {
  background-color: rgba(255, 255, 255, 0.98) !important;
  border-color: #e2e8f0 !important;
}

[data-theme="light"] nav .text-white {
  color: #1e293b !important;
}

[data-theme="light"] nav .text-gray-400,
[data-theme="light"] .nav-link {
  color: #374151 !important;
  font-weight: 500 !important;
}

[data-theme="light"] #mobile-menu {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
}

/* Hero en modo claro */
[data-theme="light"] #hero {
  background-color: #ffffff !important;
}

[data-theme="light"] #hero .text-white {
  color: #1e293b !important;
}

[data-theme="light"] #hero .text-gray-400 {
  color: #4b5563 !important;
  font-weight: 500 !important;
}

/* Portafolio en modo claro */
[data-theme="light"] #portafolio {
  background-color: #ffffff !important;
}

[data-theme="light"] #portafolio > div > div:first-child .text-white {
  color: #1e293b !important;
}

[data-theme="light"] #portafolio > div > div:first-child .text-gray-400 {
  color: #4b5563 !important;
  font-weight: 500 !important;
}

/* Contacto en modo claro */
[data-theme="light"] #contacto {
  background-color: #ffffff !important;
}

[data-theme="light"] #contacto .text-white {
  color: #ffffff !important;
}

[data-theme="light"] #contacto .text-gray-400 {
  color: #4b5563 !important;
  font-weight: 500 !important;
}

[data-theme="light"] #contacto input,
[data-theme="light"] #contacto textarea {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #1e293b !important;
}

[data-theme="light"] #contacto input::placeholder,
[data-theme="light"] #contacto textarea::placeholder {
  color: #94a3b8 !important;
}

/* Footer en modo claro */
[data-theme="light"] footer {
  background-color: #1e293b !important;
}

[data-theme="light"] footer .text-white {
  color: #ffffff !important;
}

[data-theme="light"] footer .text-gray-400 {
  color: #cbd5e1 !important;
  font-weight: 500 !important;
}

[data-theme="light"] footer .text-gray-500 {
  color: #64748b !important;
}

/* Scrollbar en modo claro */
[data-theme="light"] ::-webkit-scrollbar-track {
  background: #ffffff;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: #e10600;
}

/* Custom scrollbar class for modals */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* Portfolio item hover effect - scale the whole card, not zoom the image */
.portfolio-item {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-item:hover {
  transform: scale(1.03);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.portfolio-item img {
  transition: none !important;
  transform: none !important;
}

.portfolio-item:hover img {
  transform: none !important;
}

/* Modal background blur */
.portfolio-modal-img-blur {
  background-size: cover;
  background-position: center;
  filter: blur(20px);
  transform: scale(1.1);
}
