/* ============================================
   ALAN CANARIAS - Custom Styles
   Complementa Tailwind CSS
   ============================================ */

/* Variables CSS */
:root {
  --color-primary: #1a1a2e;
  --color-accent: #c9a96e;
  --color-accent-hover: #b8944f;
  --color-bg: #fafafa;
  --color-text: #333333;
  --color-secondary-bg: #f5f0eb;
  --color-white: #ffffff;
  --color-gray-light: #e5e5e5;
  --color-gray: #999999;
  --font-heading: 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  --transition: all 0.3s ease;
}

/* Reset y base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ============================================
   HEADER / NAVEGACION
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: var(--transition);
  background: transparent;
}

.header.scrolled {
  background: var(--color-white);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.header .logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: var(--transition);
  height: 45px;
  flex-shrink: 0;
}

.header .logo img {
  height: 45px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}

/* Logo texto */
.logo-text {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--color-white);
  white-space: nowrap;
}

.header.scrolled .logo-text {
  color: var(--color-primary);
}

.nav-link {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  padding: 0.5rem 0;
  position: relative;
  transition: var(--transition);
}

.header.scrolled .nav-link {
  color: var(--color-text);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link:hover {
  color: var(--color-accent);
}

/* Header en paginas internas (fondo oscuro desde el inicio) */
.header-inner {
  background: var(--color-primary);
}

.header-inner.scrolled {
  background: var(--color-primary);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  z-index: 1001;
}

.hamburger span {
  width: 25px;
  height: 2px;
  background: var(--color-white);
  transition: var(--transition);
}

.header.scrolled .hamburger span {
  background: var(--color-primary);
}

.header-inner .hamburger span {
  background: var(--color-white);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--color-primary);
    flex-direction: column;
    padding: 100px 40px 40px;
    transition: right 0.3s ease;
    gap: 0;
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-menu .nav-link {
    color: var(--color-white);
    font-size: 1.1rem;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }

  .mobile-overlay.active {
    display: block;
  }
}

/* ============================================
   HERO SECTIONS
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--color-white);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.85), rgba(26, 26, 46, 0.7));
  z-index: 1;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 20px;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.5px;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 300;
  opacity: 0.9;
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero compacto para paginas internas */
.hero-compact {
  min-height: 40vh;
  padding-top: 80px;
}

/* ============================================
   BOTONES
   ============================================ */
.btn {
  display: inline-block;
  padding: 14px 36px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-decoration: none;
  border-radius: 4px;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(201, 169, 110, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--color-white);
  border: 2px solid var(--color-white);
}

.btn-outline:hover {
  background: var(--color-white);
  color: var(--color-primary);
}

.btn-dark {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-dark:hover {
  background: #2a2a4a;
  transform: translateY(-2px);
}

/* ============================================
   SECCIONES
   ============================================ */
.section {
  padding: 100px 0;
}

.section-alt {
  background: var(--color-secondary-bg);
}

.section-dark {
  background: var(--color-primary);
  color: var(--color-white);
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

.section-dark .section-title {
  color: var(--color-white);
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--color-gray);
  max-width: 600px;
  margin: 0 auto 3rem;
}

.section-line {
  width: 60px;
  height: 3px;
  background: var(--color-accent);
  margin: 1rem auto 0;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--color-white);
  border-radius: 8px;
  padding: 40px 30px;
  transition: var(--transition);
  border: 1px solid transparent;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
  border-color: var(--color-accent);
}

.card-icon {
  width: 60px;
  height: 60px;
  background: var(--color-secondary-bg);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  color: var(--color-accent);
}

.card-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.card-text {
  font-size: 0.95rem;
  color: var(--color-gray);
  line-height: 1.7;
}

/* ============================================
   CONTADOR / STATS
   ============================================ */
.stat-number {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ============================================
   SERVICE DETAIL
   ============================================ */
.service-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 80px;
}

.service-block:nth-child(even) {
  direction: rtl;
}

.service-block:nth-child(even) > * {
  direction: ltr;
}

.service-block:last-child {
  margin-bottom: 0;
}

.service-image {
  width: 100%;
  height: 350px;
  background: var(--color-secondary-bg);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gray);
  font-size: 0.9rem;
  overflow: hidden;
}

.service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .service-block {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .service-block:nth-child(even) {
    direction: ltr;
  }
}

/* ============================================
   FORMULARIO DE CONTACTO
   ============================================ */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-gray-light);
  border-radius: 4px;
  font-size: 0.95rem;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-white);
  transition: var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.15);
}

textarea.form-input {
  resize: vertical;
  min-height: 140px;
}

.form-error {
  font-size: 0.85rem;
  color: #e74c3c;
  margin-top: 0.3rem;
  display: none;
}

.form-input.error {
  border-color: #e74c3c;
}

/* Honeypot anti-spam */
.ohnohoney {
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  height: 0;
  width: 0;
  z-index: -1;
}

/* Alert messages */
.alert {
  padding: 16px 20px;
  border-radius: 4px;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  display: none;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--color-primary);
  color: rgba(255, 255, 255, 0.7);
  padding: 80px 0 0;
}

.footer-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: 1.5rem;
}

.footer-link {
  display: block;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  padding: 5px 0;
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-link:hover {
  color: var(--color-accent);
  padding-left: 5px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 25px 0;
  margin-top: 60px;
  text-align: center;
  font-size: 0.85rem;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-white);
  text-decoration: none;
  margin-right: 10px;
  transition: var(--transition);
  font-size: 1.1rem;
}

.footer-social a:hover {
  background: var(--color-accent);
  transform: translateY(-3px);
}

/* ============================================
   WHATSAPP FLOATING BUTTON
   ============================================ */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.8rem;
  text-decoration: none;
  z-index: 998;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  transition: var(--transition);
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.whatsapp-float .tooltip {
  position: absolute;
  right: 70px;
  background: var(--color-white);
  color: var(--color-text);
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 0.85rem;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.whatsapp-float:hover .tooltip {
  opacity: 1;
}

/* ============================================
   GOOGLE MAPS
   ============================================ */
.map-container {
  width: 100%;
  height: 400px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--color-gray-light);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ============================================
   UTILIDADES
   ============================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.text-accent {
  color: var(--color-accent);
}

.text-center {
  text-align: center;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .section {
    padding: 70px 0;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 60px 0;
  }

  .hero-compact {
    min-height: 35vh;
  }

  .footer {
    padding: 60px 0 0;
  }
}

@media (max-width: 480px) {
  .btn {
    padding: 12px 28px;
    font-size: 0.9rem;
  }

  .whatsapp-float {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }
}
