/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://dev.ventana.plus
 Description:  Child theme para GeneratePress - Cristalería Altea Dev
 Author:       SalesCloud
 Author URI:   https://salescloud.info
 Template:     generatepress
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  generatepress-child
*/

/* ==========================================================================
   VARIABLES CSS - Colores de Marca
   ========================================================================== */

:root {
    /* Colores principales */
    --color-primary: #2AB9AD;
    --color-primary-dark: #229a90;
    --color-primary-light: #5fcfc5;

    --color-secondary: #000065;
    --color-secondary-dark: #000045;
    --color-secondary-light: #1a1a85;

    --color-accent: #009640;
    --color-accent-dark: #007530;
    --color-accent-light: #00b850;

    /* Degradados */
    --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    --gradient-primary-hover: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-secondary-dark) 100%);
    --gradient-accent: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    --gradient-dark: linear-gradient(135deg, var(--color-secondary) 0%, #1a1a40 100%);
    --gradient-soft: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);

    /* Textos */
    --color-text: #333333;
    --color-text-light: #666666;
    --color-text-muted: #999999;

    /* Fondos */
    --color-bg: #ffffff;
    --color-bg-alt: #f8f9fa;
    --color-bg-dark: #1a1a2e;

    /* Sombras */
    --shadow-sm: 0 2px 4px rgba(0, 0, 101, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 101, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 101, 0.16);
    --shadow-glow: 0 0 20px rgba(42, 185, 173, 0.3);

    /* Transiciones */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Bordes */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-full: 50px;
}

/* ==========================================================================
   ESTILOS GLOBALES
   ========================================================================== */

body {
    color: var(--color-text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Enlaces */
a {
    color: var(--color-primary);
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-secondary);
}

/* Selección de texto */
::selection {
    background: var(--color-primary);
    color: white;
}

/* ==========================================================================
   HEADER - Cabecera con degradado
   ========================================================================== */

.site-header {
    background: var(--gradient-primary);
    box-shadow: var(--shadow-md);
    padding: 10px 0;
}

.site-header a {
    color: white !important;
}

/* Logo */
.site-logo,
.custom-logo-link {
    display: flex;
    align-items: center;
}

.custom-logo {
    max-height: 60px;
    width: auto;
    filter: brightness(0) invert(1); /* Logo blanco sobre fondo de color */
    transition: all var(--transition-fast);
}

.custom-logo:hover {
    opacity: 0.9;
}

/* Header layout */
.site-header .inside-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.header-widget {
    display: flex;
    align-items: center;
}

.main-title a,
.site-title a {
    color: white !important;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.site-description {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Navegación */
.main-navigation a,
.menu-toggle {
    color: white !important;
    transition: opacity var(--transition-fast);
}

.main-navigation a:hover {
    opacity: 0.85;
}

.main-navigation .current-menu-item > a {
    border-bottom: 2px solid white;
}

/* Dropdown menus */
.main-navigation ul ul {
    background: var(--color-secondary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.main-navigation ul ul a {
    padding: 10px 20px !important;
}

.main-navigation ul ul a:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   BOTONES
   ========================================================================== */

button,
input[type="button"],
input[type="submit"],
.button,
.wp-block-button__link,
a.button {
    background: var(--gradient-primary) !important;
    border: none !important;
    color: white !important;
    padding: 12px 28px !important;
    border-radius: var(--radius-full) !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal) !important;
    cursor: pointer;
}

button:hover,
input[type="button"]:hover,
input[type="submit"]:hover,
.button:hover,
.wp-block-button__link:hover,
a.button:hover {
    background: var(--gradient-primary-hover) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

/* Botón secundario */
.button-secondary,
.wp-block-button.is-style-outline .wp-block-button__link {
    background: transparent !important;
    border: 2px solid var(--color-primary) !important;
    color: var(--color-primary) !important;
}

.button-secondary:hover,
.wp-block-button.is-style-outline .wp-block-button__link:hover {
    background: var(--color-primary) !important;
    color: white !important;
}

/* ==========================================================================
   TÍTULOS
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    color: var(--color-secondary);
    font-weight: 700;
}

/* Títulos con degradado */
.gradient-title {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Título de entrada */
.entry-title a {
    color: var(--color-secondary);
    transition: color var(--transition-fast);
}

.entry-title a:hover {
    color: var(--color-primary);
}

/* ==========================================================================
   CARDS Y CONTENEDORES
   ========================================================================== */

.card,
.wp-block-group.has-background,
article.post {
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    overflow: hidden;
}

article.post:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

/* Card con borde degradado */
.card-gradient {
    position: relative;
    background: white;
    border-radius: var(--radius-lg);
}

.card-gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 2px;
    background: var(--gradient-primary);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

/* ==========================================================================
   HERO / BANNER SECTION
   ========================================================================== */

.hero-section,
.wp-block-cover {
    background: var(--gradient-dark);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(42, 185, 173, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    text-align: center;
    padding: 80px 20px;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 30px;
}

/* ==========================================================================
   FORMULARIOS
   ========================================================================== */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="number"],
textarea,
select {
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-md);
    padding: 12px 16px;
    transition: all var(--transition-fast);
    background: var(--color-bg);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(42, 185, 173, 0.15);
    outline: none;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
    background: var(--gradient-dark);
    color: rgba(255, 255, 255, 0.85);
    padding: 60px 0 30px;
}

.site-footer a {
    color: var(--color-primary-light);
    transition: color var(--transition-fast);
}

.site-footer a:hover {
    color: white;
}

.site-footer h3,
.site-footer h4 {
    color: white;
    margin-bottom: 20px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.site-info {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
    font-size: 0.9rem;
}

/* ==========================================================================
   WIDGETS Y SIDEBAR
   ========================================================================== */

.widget {
    background: var(--color-bg);
    padding: 25px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
}

.widget-title {
    color: var(--color-secondary);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--color-primary);
    display: inline-block;
}

/* ==========================================================================
   UTILIDADES
   ========================================================================== */

/* Fondo con degradado */
.bg-gradient-primary {
    background: var(--gradient-primary);
}

.bg-gradient-dark {
    background: var(--gradient-dark);
}

.bg-gradient-accent {
    background: var(--gradient-accent);
}

/* Texto con color */
.text-primary {
    color: var(--color-primary);
}

.text-secondary {
    color: var(--color-secondary);
}

.text-accent {
    color: var(--color-accent);
}

/* Separador con degradado */
.separator-gradient {
    height: 4px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 2px;
    margin: 40px 0;
}

/* Icono circular */
.icon-circle {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: var(--shadow-md);
}

/* ==========================================================================
   ANIMACIONES
   ========================================================================== */

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

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(42, 185, 173, 0.4);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(42, 185, 173, 0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

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

@media (max-width: 768px) {
    :root {
        --radius-lg: 12px;
    }

    .hero-content {
        padding: 60px 15px;
    }

    .site-footer {
        padding: 40px 0 20px;
    }

    .footer-widgets {
        gap: 30px;
    }
}

/* ==========================================================================
   SCROLLBAR PERSONALIZADA
   ========================================================================== */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-alt);
}

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

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

/* ==========================================================================
   WORDPRESS BLOCKS - Página de Inicio
   ========================================================================== */

/* Cover blocks con degradado */
.wp-block-cover.hero-section {
    background: var(--gradient-dark) !important;
}

.wp-block-cover .wp-block-cover__background {
    background: var(--gradient-dark) !important;
}

/* Ajustes para página de inicio sin contenedor */
.page-template-default .site-content,
.page-template-default .content-area,
.page-template-default article {
    max-width: 100%;
    padding: 0;
}

.page-template-default .entry-content {
    max-width: 100%;
    margin: 0;
}

.page-template-default .entry-content > .alignfull {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
    width: 100%;
}

/* Ocultar título de página en inicio */
.home .entry-title,
.home .entry-header {
    display: none;
}

/* Cards mejoradas */
.wp-block-group.card {
    background: white;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.wp-block-group.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

/* Columnas con gap */
.wp-block-columns {
    gap: 30px;
}

/* Botones en bloques */
.wp-block-button.is-style-outline .wp-block-button__link {
    background: transparent !important;
    border: 2px solid var(--color-primary) !important;
    color: var(--color-primary) !important;
    box-shadow: none;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
    background: var(--color-primary) !important;
    color: white !important;
}

/* Listas en cover */
.wp-block-cover ul {
    list-style: none;
    padding-left: 0;
}

.wp-block-cover ul li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
}

.wp-block-cover ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: bold;
}

/* Stats card */
.wp-block-group.card-gradient {
    background: white;
    position: relative;
}

.wp-block-group.card-gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 3px;
    background: var(--gradient-primary);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.wp-block-group.card-gradient h3 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Separadores */
.wp-block-separator {
    border-color: var(--color-primary) !important;
    opacity: 0.3;
}

/* Responsive ajustes */
@media (max-width: 782px) {
    .wp-block-cover {
        min-height: 400px !important;
    }

    .wp-block-columns {
        gap: 20px;
    }

    .wp-block-column {
        margin-bottom: 20px;
    }
}

/* ==========================================================================
   SERVICE CARDS CON IMAGEN
   ========================================================================== */

.service-card {
    overflow: hidden;
}

.service-card .wp-block-image {
    margin: 0 !important;
    overflow: hidden;
}

.service-card .wp-block-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

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

/* Stats highlight cards */
.stats-highlight {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #e8e8e8;
    text-align: center;
}

.stats-highlight p:first-child {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Contact cards */
.contact-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #eee;
    text-align: center;
}

.contact-card:hover {
    border-color: var(--color-primary);
}

/* Stats card en cover */
.stats-card {
    background: white;
}

.stats-card h3 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================================================
   GALERÍA DE PROYECTOS
   ========================================================================== */

.proyectos-gallery {
    gap: 20px !important;
}

.proyectos-gallery .wp-block-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.proyectos-gallery .wp-block-image:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.proyectos-gallery .wp-block-image img {
    transition: transform var(--transition-normal);
}

.proyectos-gallery .wp-block-image:hover img {
    transform: scale(1.05);
}

.proyectos-gallery figcaption {
    background: var(--gradient-dark);
    color: white !important;
    padding: 12px 15px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    margin: 0 !important;
}

/* ==========================================================================
   LOGOS DE MARCAS
   ========================================================================== */

.marca-logo {
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all var(--transition-normal);
    max-height: 80px;
}

.marca-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
}

.marca-logo img {
    max-height: 80px;
    width: auto;
    object-fit: contain;
}

/* ==========================================================================
   MEJORAS HERO
   ========================================================================== */

.hero-section .wp-block-cover__inner-container {
    max-width: 900px;
    margin: 0 auto;
}

.hero-section .wp-block-separator {
    width: 100px;
    margin-left: auto;
    margin-right: auto;
    border-color: var(--color-primary) !important;
    border-width: 3px;
    opacity: 1;
}

/* ==========================================================================
   COVER SECTIONS
   ========================================================================== */

.wp-block-cover {
    position: relative;
}

.wp-block-cover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(transparent, rgba(0,0,0,0.3));
    pointer-events: none;
}

/* ==========================================================================
   BOTÓN WHATSAPP
   ========================================================================== */

.wp-block-button__link[style*="#25d366"] {
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4) !important;
}

.wp-block-button__link[style*="#25d366"]:hover {
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5) !important;
    transform: translateY(-2px);
}

/* ==========================================================================
   ANIMACIONES DE ENTRADA
   ========================================================================== */

.card {
    animation: fadeInUp 0.5s ease forwards;
}

.wp-block-columns .wp-block-column:nth-child(1) .card { animation-delay: 0.1s; }
.wp-block-columns .wp-block-column:nth-child(2) .card { animation-delay: 0.2s; }
.wp-block-columns .wp-block-column:nth-child(3) .card { animation-delay: 0.3s; }

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

@media (max-width: 782px) {
    .hero-section h1 {
        font-size: 2.5rem !important;
    }

    .hero-section h2 {
        font-size: 1.2rem !important;
    }

    .service-card .wp-block-image img {
        height: 180px;
    }

    .stats-card h3 {
        font-size: 3rem !important;
    }

    .proyectos-gallery {
        columns: 2 !important;
    }

    .marca-logo img {
        max-height: 50px;
    }

    .wp-block-buttons {
        flex-direction: column;
        align-items: center;
    }

    .wp-block-button {
        width: 100%;
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 2rem !important;
    }

    .proyectos-gallery {
        columns: 1 !important;
    }
}

/* ==========================================================================
   FLAVOR TEMPLATE - COLORES DE MARCA CRISTALERÍA ALTEA
   ========================================================================== */

/* Navegación con colores de marca */
.main-navigation,
.navigation-branding,
.main-navigation .inside-navigation {
    background: #000065 !important;
}

.main-navigation a {
    color: #ffffff !important;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
    color: #2AB9AD !important;
}

/* Logo en navegación */
.navigation-branding .site-logo img,
.header-image.is-logo-image {
    filter: brightness(0) invert(1);
    max-height: 50px;
}

/* Override colores globales de Flavor */
:root {
    --accent: #2AB9AD !important;
    --accent-2: #009640 !important;
    --contrast: #000065 !important;
}

/* Botones con colores de marca */
.gb-button,
.wp-block-button__link {
    background: #2AB9AD !important;
    color: #ffffff !important;
}

.gb-button:hover,
.wp-block-button__link:hover {
    background: #009640 !important;
}

/* Botones outline */
.is-style-outline .wp-block-button__link {
    background: transparent !important;
    border: 2px solid #2AB9AD !important;
    color: #2AB9AD !important;
}

.is-style-outline .wp-block-button__link:hover {
    background: #2AB9AD !important;
    color: #ffffff !important;
}

/* Footer con colores de marca */
.site-footer,
.footer-widgets-container {
    background: #000065 !important;
}

.site-footer a {
    color: #2AB9AD !important;
}

.site-footer a:hover {
    color: #ffffff !important;
}

/* Links generales */
a {
    color: #2AB9AD;
}

a:hover {
    color: #000065;
}

/* Títulos con color de marca */
h1, h2, h3, h4, h5, h6 {
    color: #000065;
}

/* Secciones hero de la página */
.gb-element-hero-section {
    background: linear-gradient(0deg, rgba(0, 0, 101, 0.85) 0%, rgba(0, 0, 101, 0.7) 100%), url(https://dev.ventana.plus/wp-content/uploads/2026/01/hero-cristaleria.jpeg) center/cover no-repeat !important;
}

/* Sección servicios */
.gb-element-servicios-section {
    background: #f5f9f9 !important;
}

/* Sección proyectos */
.gb-element-proyectos-section {
    background: #000065 !important;
}

/* Cards de servicios */
.wp-block-column[style*="background-color:#ffffff"] {
    box-shadow: 0 4px 15px rgba(0,0,101,0.1);
    transition: all 0.3s ease;
}

.wp-block-column[style*="background-color:#ffffff"]:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,101,0.15);
}

/* CTA Kömmerling */
.gb-element-cta-section {
    background: linear-gradient(135deg, #009640 0%, #007530 100%) !important;
}

/* Testimonios estrellas */
.wp-block-column p[style*="color:#2AB9AD"] {
    text-shadow: 0 0 10px rgba(42, 185, 173, 0.3);
}

/* WhatsApp button verde */
a[href*="wa.me"] {
    background: #25D366 !important;
}

a[href*="wa.me"]:hover {
    background: #20BD5A !important;
}

/* Teléfono en menú */
.main-navigation a[href^="tel:"] {
    background: #2AB9AD !important;
    padding: 8px 16px !important;
    border-radius: 25px !important;
    margin-left: 10px;
}

.main-navigation a[href^="tel:"]:hover {
    background: #009640 !important;
}

/* Imágenes con bordes redondeados */
.wp-block-image img {
    border-radius: 15px;
}

/* Mejoras responsive */
@media (max-width: 768px) {
    .main-navigation a[href^="tel:"] {
        display: block;
        text-align: center;
        margin: 10px 0;
    }

    .gb-element-hero-section {
        padding: 80px 20px !important;
    }

    .gb-element-hero-section h1 {
        font-size: 36px !important;
    }
}
