/* Reset de márgenes y paddings */
* {
  padding: 0%;
}

/* ============================
   VARIABLES GLOBALES (modo claro/oscuro)
   ============================ */
:root {
  --primary-color: #1e1e1e;      /* Color base oscuro */
  --secondary-color: #007bff;    /* Azul Bootstrap */
  --highlight-color: #ffffff;    /* Blanco para textos en fondos oscuros */
  --accent-color: #f7f7f7;       /* Fondo suave claro */

  --dark-bg: #121212;
  --dark-text: #e0e0e0;
  --light-bg: #ffffff;
  --light-text: #1e1e1e;
}

/* ============================
   SCROLL COMPENSACIÓN POR NAVBAR
   ============================ */
section {
  scroll-margin-top: 100px;
}

/* ============================
   HERO SECTION
   ============================ */
.hero-section {
  background: url('../assets/images/FondoPor.png') center/cover no-repeat;
  min-height: 100vh;
  padding: 80px 0;
  color: var(--highlight-color);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* Sombra oscura */
  backdrop-filter: blur(4px);     /* Desenfoque */
  z-index: 1;
}

.hero-section .container {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  max-width: 100%;
  overflow-x: hidden;
}

.hero-logo {
  flex: 1 1 40%;
  text-align: center;
}

.hero-logo img {
  width: 250px;
  max-width: 100%;
  filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
  transition: transform 0.3s ease;
}

.hero-logo img:hover {
  transform: scale(1.05);
}

.hero-text {
  flex: 1 1 50%;
  padding: 20px;
}

.hero-text h2 {
  font-size: 2.5rem;
  font-weight: bold;
}

.hero-text p {
  font-size: 1.2rem;
}

/* Animación de entrada para logo */
.logo-inicio {
  animation: fadeInLeft 1s ease-out;
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ============================
   MODO OSCURO
   ============================ */
body.dark-mode {
  background-color: var(--dark-bg);
  color: var(--dark-text);
}

body.dark-mode .card,
body.dark-mode .form-card {
  background-color: #1e1e1e;
  color: var(--dark-text);
}

body.dark-mode .section-title {
  color: var(--highlight-color);
}

/* ============================
   CONFIGURACIÓN GENERAL
   ============================ */
body {
  background-color: var(--accent-color);
  color: var(--primary-color);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  transition: all 0.3s ease;
}

/* ============================
   NAVBAR
   ============================ */
.navbar, .custom-navbar {
  background-color: var(--primary-color);
  padding: 10px 0;
  animation: fadeDown 1s ease-out;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-brand span {
  font-size: 1rem;
  color: var(--highlight-color);
}

.navbar-brand img {
  max-height: 40px;
}

.nav-link {
  color: var(--highlight-color) !important;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: #ff0000 !important;
}

/* ============================
   SOBRE MÍ SECTION
   ============================ */
#sobre-mi {
  min-height: 100vh;
  padding: 100px 0;
  display: flex;
  align-items: center;
  position: relative;
  background: url('../assets/images/FondoPor.png') center/cover no-repeat;
}

#sobre-mi h3 {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 40px;
  color: #fff;
  z-index: 2;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.5);
}

/* ============================
   SECCIONES Y TITULOS
   ============================ */
.section-title {
  text-align: center;
  margin: 60px 0 30px;
  font-weight: 700;
  color: var(--primary-color);
}

.sobre-mi-section {
  opacity: 0;
  transform: translateY(50px);
  transition: all 1s ease;
}

.sobre-mi-section.aos-animate {
  opacity: 1;
  transform: translateY(0);
}

/* ============================
   TARJETAS DE PROYECTOS
   ============================ */
.card {
  border: none;
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  transition: all 0.3s ease-in-out;
  background-color: #ffffff;
}

.card:hover {
  transform: translateY(-5px);
}

.proyectos-container {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 1rem;
}

.proyecto-card {
  flex-shrink: 0;
  width: 320px;
  min-height: 100%;
  transition: transform 0.3s ease;
  border: none;
  background: linear-gradient(to bottom right, #1c1c1c, #2a2a2a);
  scroll-snap-align: start;
}

.proyecto-card:hover {
  transform: scale(1.02);
  box-shadow: 0 10px 20px rgba(255, 255, 255, 0.15);
}

.proyecto-card img {
  height: 100%;
  object-fit: cover;
  border-top-left-radius: 1rem;
  border-bottom-left-radius: 1rem;
}

.proyectos-carrusel {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 2rem 0;
  scroll-padding-left: 1rem;
}

.proyectos-carrusel::-webkit-scrollbar {
  height: 6px;
}
.proyectos-carrusel::-webkit-scrollbar-thumb {
  background-color: #888;
  border-radius: 4px;
}

/* SCROLL DEL CONTENEDOR */
.proyectos-container::-webkit-scrollbar {
  height: 8px;
}
.proyectos-container::-webkit-scrollbar-thumb {
  background-color: #888;
  border-radius: 10px;
}

/* ============================
   HABILIDADES
   ============================ */
.skills i {
  font-size: 50px;
  margin: 15px;
}

/* ============================
   FORMULARIO DE CONTACTO
   ============================ */
.form-card {
  background-color: #ffffff;
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  animation: fadeUp 1s ease;
  transition: all 0.3s ease;
}

.form-card:hover {
  transform: scale(1.02);
}

.contacto-info {
  padding: 2rem;
  background-color: #f1f1f1;
  border-radius: 20px;
  height: 100%;
}

/* ============================
   FOOTER
   ============================ */
footer {
  background-color: var(--primary-color);
  color: var(--highlight-color);
  padding: 30px 0;
}

footer a {
  color: #ffffff;
  transition: color 0.3s ease;
}

footer a:hover {
  color: #ff0000;
}

/* ============================
   BOTONES
   ============================ */
.btn-outline-dark,
.btn-outline-primary,
.btn-dark {
  border-radius: 30px;
  transition: all 0.3s ease;
}

.btn-dark:hover {
  background-color: #ff0000;
  border-color: #ff0000;
}

/* ============================
   ANIMACIONES GLOBALES
   ============================ */
@keyframes fadeDown {
  0% {
    opacity: 0;
    transform: translateY(-30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================
   BOTÓN IR ARRIBA
   ============================ */
#btn-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #0dcaf0;
  border: none;
  padding: 10px 14px;
  border-radius: 50%;
  color: white;
  font-size: 20px;
  cursor: pointer;
  display: none;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  z-index: 999;
}

/* ENLACES CON TRANSICIÓN */
.transition-hover {
  transition: color 0.3s ease;
}

.transition-hover:hover {
  color: #0dcaf0 !important;
  text-decoration: underline;
}

/* PROGRESS BARS */
.progress-bar {
  transition: width 1.5s ease-in-out;
}
