/* ===== ESTILOS PROFESIONALES PARA PORTFOLIO ===== */

/* Variables CSS para colores profesionales */
:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --accent-color: #e74c3c;
  --text-color: #2c3e50;
  --text-light: #7f8c8d;
  --bg-light: #ecf0f1;
  --white: #ffffff;
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Variables para modo oscuro */
[data-theme="dark"] {
  --primary-color: #ecf0f1;
  --secondary-color: #3498db;
  --accent-color: #e74c3c;
  --text-color: #ecf0f1;
  --text-light: #bdc3c7;
  --bg-light: #1a1a2e;
  --white: #16213e;
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  --gradient: linear-gradient(135deg, #434343 0%, #000000 100%);
}

/* Tema oscuro para el body */
[data-theme="dark"] body {
  background-color: #0f3460;
  color: var(--text-color);
}

[data-theme="dark"] .navbar {
  background: rgba(26, 26, 46, 0.98) !important;
}

[data-theme="dark"] .hero-section {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  background-size: 200% 200%;
  animation: bg-pan-left 15s ease-in-out infinite;
}

[data-theme="dark"] .service-card,
[data-theme="dark"] .contact-form {
  background: var(--white);
  color: var(--text-color);
}

[data-theme="dark"] footer {
  background: var(--bg-light);
}

/* Transición suave al cambiar de tema */
body,
.navbar,
.hero-section,
.service-card,
.contact-form,
footer,
.section-title,
.about-text,
.form-control {
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Mejoras de contraste en modo oscuro */
[data-theme="dark"] .section-title {
  color: var(--text-color);
}

[data-theme="dark"] .form-control {
  background: #16213e;
  color: var(--text-color);
  border-color: #2c3e50;
}

[data-theme="dark"] .form-control::placeholder {
  color: #7f8c8d;
}

[data-theme="dark"] .form-control:focus {
  background: #1a1a2e;
  color: var(--text-color);
}

[data-theme="dark"] .form-label {
  color: var(--text-color);
}

[data-theme="dark"] .navbar-brand,
[data-theme="dark"] .nav-link {
  color: var(--text-color) !important;
}

[data-theme="dark"] .btn-primary {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
}

[data-theme="dark"] #aboutme {
  background: #16213e;
}

[data-theme="dark"] #services {
  background: #0f3460;
}

[data-theme="dark"] #portfolio {
  background: #16213e;
}

[data-theme="dark"] #contact {
  background: #0f3460;
}

/* Fuentes profesionales */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
  font-family: 'Poppins', sans-serif;
}

/* Estilos globales */
body {
  line-height: 1.6;
  color: var(--text-color);
  scroll-behavior: smooth;
}

/* Navegación profesional */
.navbar {
  background: rgba(255, 255, 255, 0.95) !important;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  padding: 1rem 0;
}

 

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary-color) !important;
}

.nav-link {
  font-weight: 500;
  color: var(--text-color) !important;
  transition: color 0.3s ease;
  margin: 0 0.5rem;
}

.nav-link:hover {
  color: var(--secondary-color) !important;
}

/* Botón de modo oscuro */
.btn-dark-mode {
  background: transparent;
  border: 2px solid var(--secondary-color);
  color: var(--secondary-color);
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0;
}

.btn-dark-mode:hover {
  background: var(--secondary-color);
  color: white;
  transform: rotate(20deg);
}

.btn-dark-mode:focus {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}

[data-theme="dark"] .btn-dark-mode {
  border-color: #f39c12;
  color: #f39c12;
}

[data-theme="dark"] .btn-dark-mode:hover {
  background: #f39c12;
  color: #1a1a2e;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  background-size: 200% 200%;
  color: white;
  padding: 120px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: bg-pan-left 15s ease-in-out infinite;
}

/* Keyframes para animación de paneo del fondo */
@keyframes bg-pan-left {
  0% {
    background-position: 100% 50%;
  }
  50% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

@-webkit-keyframes bg-pan-left {
  0% {
    background-position: 100% 50%;
  }
  50% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="%23ffffff10"><polygon points="0,0 1000,100 1000,0"/></svg>');
  background-size: cover;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  animation: fadeInUp 1s ease;
}

.hero-subtitle {
  font-size: 1.3rem;
  font-weight: 300;
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease 0.2s both;
}

.hero-description {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease 0.4s both;
}

.btn-hero {
  padding: 12px 30px;
  font-weight: 500;
  border-radius: 50px;
  transition: all 0.3s ease;
  animation: fadeInUp 1s ease 0.6s both;
}

.btn-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Secciones */
section {
  padding: 80px 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--secondary-color);
  border-radius: 2px;
}

/* About Section */
#aboutme {
  background: var(--bg-light);  
}

#aboutme .row {
  align-items: center;
}

.profile-img {
  width: 100%;
  max-width: 350px;
  height: auto;
  object-fit: cover;
  box-shadow: var(--shadow);
  display: block;
  margin: 0 auto 2rem;
  
  -webkit-border-radius: 25px;
  -moz-border-radius: 25px;
  -ms-border-radius: 25px;
  -o-border-radius: 25px;
  border-radius: 25px;
  -webkit-transition: transform 0.3s ease;
  -moz-transition: transform 0.3s ease;
  -ms-transition: transform 0.3s ease;
  -o-transition: transform 0.3s ease;
  transition: transform 0.3s ease;
}

.profile-img:hover {
  transform: scale(1.02);
}

/* Alineación vertical de imagen y texto en About */
#aboutme .col-lg-5 {
  display: flex;
  align-items: center;
  justify-content: center;
}

#aboutme .col-lg-7 {
  display: flex;
  align-items: center;
}

.about-text {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-light);
}


.social-link {
  display: inline-block;
  width: 50px;
  height: 50px;
  background: var(--secondary-color);
  color: white;
  border-radius: 50%;
  text-align: center;
  line-height: 50px;
  margin: 0 10px;
  transition: all 0.3s ease;
  text-decoration: none;
}

.social-link:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
  color: white;
}

/* Services Section */
.service-card {
  border: none;
  border-radius: 15px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  height: 100%;
  margin-bottom: 2rem;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.service-icon {
  font-size: 3rem;
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

.service-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

/* Contact Section */
#contact {
  background: var(--bg-light);
}

.contact-form {
  background: white;
  padding: 3rem;
  border-radius: 15px;
  box-shadow: var(--shadow);
}

.form-control {
  border: 2px solid #e9ecef;
  border-radius: 10px;
  padding: 12px 15px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-control:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.form-label {
  font-weight: 500;
  color: var(--primary-color);
  margin-bottom: 0.8rem;
}

.btn-submit {
  background: var(--secondary-color);
  border: none;
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-submit:hover {
  background: var(--primary-color);
  transform: translateY(-2px);
}

/* Footer */
footer {
  background: var(--primary-color);
  color: white;
  text-align: center;
  padding: 3rem 0;
}

/* Alertas personalizadas */
.custom-alert {
  border: none;
  border-radius: 10px;
  padding: 1rem 1.5rem;
  margin-top: 1rem;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border-left: 4px solid #28a745;
}

.alert-danger {
  background: #f8d7da;
  color: #721c24;
  border-left: 4px solid #dc3545;
}

/* Animaciones */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease;
}

/* Spinner de carga */
.spinner-border-sm {
  width: 1rem;
  height: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .contact-form {
    padding: 2rem;
  }
  
  .navbar-nav {
    text-align: center;
  }
}

@media (max-width: 576px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .contact-form {
    padding: 1.5rem;
  }
}

/* Mejoras de accesibilidad */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Focus states mejorados */
.btn:focus, .form-control:focus, .nav-link:focus {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}