/* Theme Name: Blocksy Child
   Template: blocksy
   Author: Enric
   Version: 1.0.0
   Description: Tema hijo de Blocksy para personalizar header, footer y estilos.
*/

/* ==========================
   HEADER PERSONALIZADO
   ========================== */

/* Header fijo y transparente */
#site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

/* Contenedor header */
.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 30px 20px 30px;
}

/* Logo */
#logo img {
    max-height: 60px;
    width: auto;
    transition: transform 0.3s ease;
}
#logo img:hover {
    transform: scale(1.1);
}

/* Menú principal */
.main-menu {
    display: flex;
    gap: 25px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-menu li a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: text-shadow 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

/* Glow azul al hover + vibración */
.main-menu li a:hover {
    color: #00d4ff;
    text-shadow: 
        0 0 5px #00d4ff,
        0 0 10px #00d4ff,
        0 0 20px #00d4ff,
        0 0 30px #00d4ff;
    animation: shake 0.2s ease-in-out 1;
}

@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  50% { transform: translateX(2px); }
  75% { transform: translateX(-2px); }
  100% { transform: translateX(0); }
}

/* Iconos de contacto en header */
.header-contact-icons {
    display: flex;
    gap: 15px;
}
.contact-icon-wrapper img {
    width: 28px;
    height: auto;
    cursor: pointer;
    transition: transform 0.3s ease;
    filter: invert(1);
}
.contact-icon-wrapper img:hover {
    transform: scale(1.2);
}

/* Botón hamburguesa móvil */
.menu-toggle {
    display: none;
    font-size: 28px;
    background: none;
    border: none;
    cursor: pointer;
    color: #ffffff;
}

/* Responsive header */
@media (max-width: 768px) {
    .main-menu {
        display: none;
        flex-direction: column;
        background: rgba(0,0,0,0.9);
        position: absolute;
        top: 100%;
        right: 0;
        width: 220px;
        padding: 15px;
        border-radius: 0 0 8px 8px;
    }
    .main-menu li {
        margin-bottom: 12px;
    }
    .menu-toggle {
        display: block;
    }
}

/* ==========================
   FOOTER FIJO AL FONDO
   ========================== */

/* Contenedor principal de la página */
body, #page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

/* Contenido principal */
#content, .site-content, .elementor {
    flex: 1 0 auto;
    width: 100%;
}

/* Footer */
.custom-footer.mi-fondo {
    width: 100vw;
    max-width: 100%;
    text-align: center;
    padding: 20px 10px;
    background: linear-gradient(48deg, rgb(6, 147, 227) 0%, rgb(20, 0, 37) 68%);
    color: #fff;
    box-sizing: border-box;
    margin-top: auto;
}

/* Redes sociales */
.footer-social {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}
.footer-social a {
    color: #fff;
    font-size: 20px;
    transition: color 0.3s ease;
}
.footer-social a:hover {
    color: #00d4ff;
}

/* Copyright footer */
.footer-bottom {
    font-size: 14px;
    color: #eee;
}

/* ==========================
   AJUSTES ELEMENTOR
   ========================== */

body.elementor-page .elementor,
body.elementor-page .elementor-inner,
body.elementor-page .elementor-section,
body.elementor-page .elementor-container,
body.elementor-page .elementor-column,
body.elementor-page .elementor-widget-wrap {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    flex: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
}

body.elementor-page .elementor-section:after,
body.elementor-page .elementor-column:after {
    content: "";
    display: table;
    clear: both;
}

/* ==========================
   CONTENEDORES PADRE DEL FOOTER
   ========================== */

.site, .site-content, .elementor, .elementor-section, .elementor-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
}

/* ==========================
   FUENTE FF SARI BLACK
   ========================== */

@font-face {
  font-family: 'FF Sari Black';
  src: url('/wp-content/themes/blocksy-child/fonts/sari_black-webfont.woff2') format('woff2'),
       url('/wp-content/themes/blocksy-child/fonts/sari_black-webfont.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

/* Aplica la fuente a toda la sección de máquinas */
#maquinas-alquiler,
#maquinas-alquiler h1,
#maquinas-alquiler h2,
#maquinas-alquiler h3,
#maquinas-alquiler p,
#maquinas-alquiler .responsive-subtext,
#maquinas-alquiler .maquina-item {
  font-family: 'FF Sari Black', sans-serif;
}

/* ==========================
   CONTENEDORES DE MÁQUINAS
   ========================== */

#maquinas-alquiler .maquinas-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 30px auto 0 auto;
}

#maquinas-alquiler .maquina-item {
  background: linear-gradient(135deg, #ff4b2b, #ff416c);
  border-radius: 15px;
  padding: 20px;
  color: white;
  transition: transform 0.3s, box-shadow 0.3s;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  aspect-ratio: 1 / 1;
}

#maquinas-alquiler .maquina-item:nth-child(2) {
  background: linear-gradient(135deg, #00c6ff, #0072ff);
}
#maquinas-alquiler .maquina-item:nth-child(3) {
  background: linear-gradient(135deg, #f7971e, #ffd200);
}
#maquinas-alquiler .maquina-item:nth-child(4) {
  background: linear-gradient(135deg, #43cea2, #185a9d);
}

#maquinas-alquiler .maquina-item img {
  width: 80%;
  height: auto;
  object-fit: contain;
  margin: 10px auto;
  border-radius: 10px;
}

#maquinas-alquiler .maquina-item h3 {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

#maquinas-alquiler .maquina-item p {
  font-size: 1.2rem;
  line-height: 1.4;
  margin-top: 10px;
}

#maquinas-alquiler .maquina-item:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 15px 25px rgba(0,0,0,0.2);
  cursor: pointer;
}

/* ==========================
   RESPONSIVE
   ========================== */

@media (max-width: 1024px) {
  #maquinas-alquiler .maquinas-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  #maquinas-alquiler .maquinas-container {
    grid-template-columns: 1fr;
  }
  #maquinas-alquiler .maquina-item {
    aspect-ratio: auto;
  }
  #maquinas-alquiler .maquina-item img {
    width: 100%;
  }
}

/* ==========================
   PÁRRAFO SEO RESPONSIVE
   ========================== */

#maquinas-alquiler .seo-container {
  max-width: 800px;
  margin: 0 auto 40px auto;
  text-align: center;
}

#maquinas-alquiler .seo-container h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  color: #000;
}

#maquinas-alquiler .responsive-subtext {
  font-size: 21px;
  line-height: 1.6;
  color: black;
  margin: 0 auto;
}

@media (max-width: 768px) {
  #maquinas-alquiler .seo-container h1 {
    font-size: 2rem;
  }
  #maquinas-alquiler .responsive-subtext {
    font-size: 16px;
    line-height: 1.4;
  }
}

@media (max-width: 480px) {
  #maquinas-alquiler .seo-container h1 {
    font-size: 1.6rem;
  }
  #maquinas-alquiler .responsive-subtext {
    font-size: 14px;
    line-height: 1.4;
    padding: 0 10px;
  }
}
