/*!
 * LagunWare - Modern CSS Styles
 * Clean, modern design with CSS custom properties
 */

/* CSS Custom Properties */
:root {
  /* Colors */
  --primary: #0d6efd;
  --primary-dark: #0b5ed7;
  --primary-light: #6ea8fe;
  --secondary: #6c757d;
  --success: #198754;
  --info: #0dcaf0;
  --warning: #ffc107;
  --danger: #dc3545;
  --light: #f8f9fa;
  --dark: #212529;
  --white: #ffffff;
  
  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-size-base: 1rem;
  --font-size-sm: 0.875rem;
  --font-size-lg: 1.25rem;
  --line-height: 1.6;
  
  /* Spacing */
  --section-padding: 5rem 0;
  
  /* Shadows */
  --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
  
  /* Border Radius */
  --radius: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 1rem;
  
  /* Transitions */
  --transition: all 0.3s ease-in-out;
  --transition-fast: all 0.15s ease-in-out;
}

/* Reset & Base */
* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  color: var(--dark);
  background-color: var(--white);
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.display-4 {
  font-size: 2.5rem;
  font-weight: 700;
}

.display-5 {
  font-size: 2rem;
  font-weight: 700;
}

.lead {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--secondary);
}

/* Navigation */
.navbar {
  transition: var(--transition);
  padding: 1rem 0;
}

.navbar-scrolled {
  background-color: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
}

.nav-link {
  font-weight: 500;
  transition: var(--transition-fast);
  position: relative;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 50%;
  background-color: var(--primary);
  transition: var(--transition-fast);
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 100%;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%), 
              url('../img/1-1.png') center/cover no-repeat;
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

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

.hero-image img {
  max-width: 100%;
  height: auto;
  transition: var(--transition);
}

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

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

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

.animate-fade-in-delay {
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.animate-fade-in-delay-2 {
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.animate-fade-in-delay-3 {
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

/* Services Section */
#servicios {
  background: linear-gradient(135deg, rgba(248, 249, 250, 0.95) 0%, rgba(248, 249, 250, 0.95) 100%), 
              url('../img/4.jpg') center/cover no-repeat;
  background-attachment: fixed;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.service-image img {
  transition: var(--transition);
  height: 200px;
  object-fit: cover;
  width: 100%;
}

.service-card:hover .service-image img {
  transform: scale(1.05);
}

.service-icon {
  transition: var(--transition);
}

.service-card:hover .service-icon {
  transform: scale(1.1);
}

.service-card:hover .service-icon i {
  color: var(--primary-dark) !important;
}

/* Gallery Section */
.gallery-img {
  transition: var(--transition);
  height: 200px;
  object-fit: cover;
  width: 100%;
  cursor: pointer;
}

.gallery-img:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

/* Divider */
.divider {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 2px;
  margin: 1rem auto;
}

/* Contact Section */
#contacto {
  background: linear-gradient(135deg, rgba(33, 37, 41, 0.95) 0%, rgba(33, 37, 41, 0.95) 100%), 
              url('../img/5.jpg') center/cover no-repeat;
  background-attachment: fixed;
}

.contact-item {
  transition: var(--transition);
  padding: 1rem;
  border-radius: var(--radius);
}

.contact-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateX(10px);
}

.contact-icon i {
  transition: var(--transition);
}

.contact-item:hover .contact-icon i {
  transform: scale(1.1);
}

/* Map */
.map-wrapper {
  transition: var(--transition);
}

.map-wrapper:hover {
  transform: scale(1.02);
}

/* Buttons */
.btn {
  font-weight: 500;
  border-radius: var(--radius);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: var(--transition);
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-lg {
  padding: 0.75rem 2rem;
  font-size: 1.125rem;
}

/* Back to Top Button */
#backToTop {
  display: none;
  width: 50px;
  height: 50px;
  z-index: 1000;
  transition: var(--transition);
  border: none;
}

#backToTop:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* Footer */
.footer-modern {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  position: relative;
  overflow: hidden;
}

.footer-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('../img/5.jpg') center/cover no-repeat;
  opacity: 0.1;
  z-index: 1;
}

.footer-modern .container {
  position: relative;
  z-index: 2;
}

/* Footer Brand */
.footer-brand img {
  transition: var(--transition);
}

.footer-brand:hover img {
  transform: scale(1.05);
}

/* Footer Links */
.footer-links {
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: var(--transition);
  font-size: 0.9rem;
  position: relative;
}

.footer-link:hover {
  color: var(--white);
  transform: translateX(5px);
}

.footer-link::before {
  content: '';
  position: absolute;
  left: -15px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 1px;
  background: var(--white);
  transition: var(--transition);
}

.footer-link:hover::before {
  width: 10px;
}

/* Social Links */
.social-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border-radius: 50%;
  text-decoration: none;
  transition: var(--transition);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-link:hover {
  background: var(--white);
  color: var(--primary);
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.social-link i {
  font-size: 1.1rem;
}

/* Footer Contact */
.footer-contact .contact-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.footer-contact .contact-item i {
  font-size: 1.1rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.footer-contact .contact-item span,
.footer-contact .contact-item a {
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Footer Bottom */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  padding-top: 1.5rem;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: flex-end;
}

.footer-legal .footer-link {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer-legal .footer-link:hover {
  color: var(--white);
}

/* Footer Responsive */
@media (max-width: 768px) {
  .footer-modern .row {
    text-align: center;
  }
  
  .footer-legal {
    justify-content: center;
    margin-top: 1rem;
  }
  
  .social-links {
    justify-content: center;
  }
  
  .footer-contact .contact-item {
    justify-content: center;
  }
}

@media (max-width: 576px) {
  .footer-modern {
    padding: 2rem 0;
  }
  
  .footer-modern .row {
    padding: 2rem 0;
  }
  
  .social-links {
    gap: 0.5rem;
  }
  
  .social-link {
    width: 35px;
    height: 35px;
  }
  
  .social-link i {
    font-size: 1rem;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .display-4 {
    font-size: 2rem;
  }
  
  .display-5 {
    font-size: 1.75rem;
  }
  
  .hero-section {
    text-align: center;
    background-attachment: scroll;
  }
  
  .hero-buttons .btn {
    display: block;
    width: 100%;
    margin-bottom: 1rem;
  }
  
  .service-card {
    margin-bottom: 2rem;
  }
  
  .service-image img {
    height: 150px;
  }
  
  .gallery-img {
    height: 150px;
  }
  
  .contact-item {
    text-align: center;
  }
  
  .contact-item:hover {
    transform: translateY(-5px);
  }
  
  #servicios,
  #contacto {
    background-attachment: scroll;
  }
}

@media (max-width: 576px) {
  :root {
    --section-padding: 3rem 0;
  }
  
  .display-4 {
    font-size: 1.75rem;
  }
  
  .lead {
    font-size: 1.125rem;
  }
  
  .hero-buttons .btn {
    font-size: 1rem;
    padding: 0.5rem 1.5rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles */
.btn:focus,
.nav-link:focus,
a:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Legal Pages Styles */
.legal-content {
  line-height: 1.8;
}

.legal-content h2 {
  color: var(--primary);
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.legal-content h3 {
  color: var(--dark);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.legal-content h4 {
  color: var(--secondary);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.legal-content ul {
  padding-left: 1.5rem;
}

.legal-content li {
  margin-bottom: 0.5rem;
}

.contact-info {
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.05) 0%, rgba(13, 110, 253, 0.1) 100%);
  border-left: 4px solid var(--primary);
}

.contact-info p {
  margin-bottom: 0.75rem;
}

.contact-info i {
  width: 20px;
  text-align: center;
}

/* Legal Cards */
.card {
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.card-title {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.card-text {
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Rights Icons */
.d-flex i {
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

/* Alert Styles */
.alert {
  border: none;
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.alert-info {
  background: linear-gradient(135deg, rgba(13, 202, 240, 0.1) 0%, rgba(13, 202, 240, 0.05) 100%);
  color: var(--info);
  border-left: 4px solid var(--info);
}

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

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}
