/* Custom Stylesheet */
/**
 * Estilos personalizados para Edgardo - Gasista Matriculado
 * Paleta de colores: Azul Profundo (#003366) + Naranja (#FF4500)
 */

/* Variables de Color */
:root {
  --color-primary: #003366;
  --color-accent: #FF4500;
  --color-white: #FFFFFF;
  --color-light-gray: #F0F0F0;
  --color-success: #4CAF50;
}

/* Estilos Globales */
body {
  font-family: 'Roboto', sans-serif;
  color: #333;
}

/* ============================================================================
   NAVEGACIÓN STICKY (FIJA)
   ============================================================================ */

nav {
  position: sticky !important;
  top: 0 !important;
  z-index: 998 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

nav.scrolled {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  background-color: rgba(0, 51, 102, 0.98) !important;
}

nav ul a,
nav .brand-logo {
  color: #FFFFFF;
  transition: all 0.3s ease;
}

nav ul a:hover {
  background-color: rgba(255, 69, 0, 0.2);
  border-radius: 4px;
}

nav .brand-logo {
  font-size: 1.3rem;
  font-weight: bold;
  letter-spacing: 0.5px;
}

nav .brand-logo i {
  margin-right: 8px;
}

/* Ajuste de padding del body para compensar header sticky */
body {
  padding-top: 0;
}

/* Asegurar que el contenido no se oculte bajo el header */
main, .container, .parallax-container {
  position: relative;
  z-index: 1;
}

/* Sidenav styling */
.sidenav {
  background-color: #003366 !important;
}

.sidenav li > a {
  color: #FFFFFF !important;
  padding: 16px 32px !important;
}

.sidenav li > a:hover {
  background-color: rgba(255, 69, 0, 0.2) !important;
}

p {
  line-height: 2rem;
  color: #666;
}

h1, h2, h3, h4, h5, h6 {
  color: #003366;
}

.sidenav-trigger {
  color: #FFFFFF;
}

/* Contenedores Parallax */
.parallax-container {
  min-height: 380px;
  line-height: 0;
  height: auto;
  color: rgba(255,255,255,.9);
}

.parallax-container .section {
  width: 100%;
}

@media only screen and (max-width : 992px) {
  .parallax-container .section {
    position: absolute;
    top: 40%;
  }
  #index-banner .section {
    top: 10%;
  }
}

@media only screen and (max-width : 600px) {
  #index-banner .section {
    top: 0;
  }
}

/* Bloques de Iconos */
.icon-block {
  padding: 0 15px;
  text-align: center;
}

.icon-block .material-icons {
  font-size: inherit;
  color: #003366;
}

/* Footer */
footer.page-footer {
  margin: 0;
  background-color: #003366;
}

/* Botones */
.btn, .btn-large {
  background-color: #003366;
  transition: all 0.3s ease;
}

.btn:hover, .btn-large:hover {
  background-color: #002244;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-accent {
  background-color: #FF4500;
}

.btn-accent:hover {
  background-color: #E63E00;
}

/* Tarjetas */
.card {
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transform: translateY(-2px);
}

.card-title {
  color: #003366;
  font-weight: bold;
}

/* Enlaces */
a {
  color: #003366;
  text-decoration: none;
}

a:hover {
  color: #FF4500;
}

/* ============================================================================
   OPTIMIZACIÓN DE IMÁGENES Y LAZY LOADING
   ============================================================================ */

/* ============================================================================
   ESTILOS PARA LAZY LOADING (SOLO IMÁGENES)
   ============================================================================ */

/* Animación shimmer SOLO para imágenes con clase lazy-load */
img.lazy-load {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  opacity: 0.8;
}

/* Cuando la imagen carga, remover animación */
img.lazy-load.loaded {
  animation: none;
  opacity: 1;
  background: none;
}

/* Animación de shimmer */
@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Prevenir layout shift con aspect-ratio */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Optimización de imágenes responsivas */
picture {
  display: block;
}

picture img {
  width: 100%;
  height: auto;
}

/* Secciones */
.section {
  padding: 2rem 0;
}

/* ============================================================================
   ESTILOS PARA FORMULARIO DE CONTACTO
   ============================================================================ */

/* Estilos del formulario */
.input-field {
  margin-bottom: 1.5rem;
}

.input-field input,
.input-field textarea {
  border-bottom: 2px solid #ddd;
  transition: border-color 0.3s ease;
}

.input-field input:focus,
.input-field textarea:focus {
  border-bottom: 2px solid #FF4500 !important;
  box-shadow: 0 1px 0 0 #FF4500 !important;
}

.input-field label {
  color: #999;
  font-size: 14px;
}

.input-field input:focus + label,
.input-field textarea:focus + label {
  color: #FF4500;
}

/* Estilos de validación */
.input-field input.valid,
.input-field textarea.valid {
  border-bottom: 2px solid #4CAF50 !important;
}

.input-field input.invalid,
.input-field textarea.invalid {
  border-bottom: 2px solid #f44336 !important;
}

/* Tarjetas de mensaje */
.card.green.lighten-2 {
  background-color: #c8e6c9 !important;
}

.card.red.lighten-2 {
  background-color: #ffcdd2 !important;
}

/* Responsive */
@media only screen and (max-width: 600px) {
  .btn-large {
    width: 100%;
    margin-bottom: 10px;
  }

  .col.s12.m8.offset-m2 {
    padding: 0 10px;
  }
}
