/*
Theme Name: ALH Custom Theme
Theme URI: https://alh.digency.es
Author: Digency
Author URI: https://digency.es
Description: Custom WordPress theme for ALH Group, based on the static HTML design.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: alh-theme
*/

/* CSS Variables - Sattis Palette */
:root {
    --primary-dark: #00606c;
    /* Dark Teal */
    --primary-medium: #019391;
    /* Medium Teal */
    --accent: #00dfc3;
    /* Bright Cyan/Turquoise */
    --text-light: #ffffff;
    --text-dark: #333333;
    --bg-light: #f4f4f4;
    --bg-white: #ffffff;

    --font-main: 'Inter', sans-serif;
    --transition: all 0.3s ease;
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-white);
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
    height: auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays for grids */
.reveal-delay-1 {
    transition-delay: 0.1s;
}

.reveal-delay-2 {
    transition-delay: 0.2s;
}

.reveal-delay-3 {
    transition-delay: 0.3s;
}

.reveal-delay-4 {
    transition-delay: 0.4s;
}


/* Utilities */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.highlight {
    color: var(--primary-medium);
    text-decoration: underline;
    text-decoration-color: var(--primary-medium);
    text-underline-offset: 4px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--primary-dark);
    /* Dark text for contrast on bright cyan */
}

.btn-primary:hover {
    background-color: #00c0a8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 223, 195, 0.3);
}

.btn-secondary {
    border: 2px solid var(--primary-medium);
    color: var(--primary-medium);
    background: transparent;
}

.btn-secondary:hover {
    background-color: var(--primary-medium);
    color: var(--text-light);
}

.btn-action {
    background-color: var(--accent);
    color: var(--primary-dark);
    width: 100%;
    font-size: 1rem;
}

.btn-action:hover {
    background-color: #00c0a8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 223, 195, 0.3);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    padding: 20px 0;
    color: var(--text-light);
}

.navbar.scrolled {
    background-color: var(--primary-dark);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    transition: var(--transition);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--accent);
    transition: width 0.3s;
}

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

.nav-links a:hover {
    color: var(--accent);
}

.btn-nav {
    border: 1px solid var(--text-light);
    padding: 8px 16px;
    border-radius: 4px;
}

.btn-nav:hover {
    background-color: var(--accent);
    border-color: var(--accent);
    color: var(--primary-dark);
}

/* 1. Header / Hero Section - REPLACED BY TAILWIND HERO IN INDEX.HTML */
/* Keeping base styles just in case, but Tailwind handles the overlay/video */

/* 2. Section "Sobre Nosotros" */
.about-section {
    padding: 100px 0;
    background-color: var(--bg-white);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image img {
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transition: transform 0.6s ease;
}

.about-image img:hover {
    transform: scale(1.02);
}

.about-text h2 {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 20px;
}

.about-text p {
    color: #555;
    margin-bottom: 40px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.stat-card {
    background-color: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

.stat-card:hover {
    background-color: #fff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    transform: translateY(-5px);
    border-bottom-color: var(--accent);
}

.stat-card h3 {
    font-size: 2rem;
    color: var(--primary-medium);
    margin-bottom: 5px;
}

.stat-card p {
    font-size: 0.9rem;
    margin-bottom: 0;
    color: #666;
    font-weight: 500;
}

/* 3. Section Servicios */
.services-section {
    background-color: var(--primary-dark);
    color: var(--text-light);
    padding: 100px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.service-card {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 8px;
    transition: var(--transition);
    min-height: 450px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.service-card:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-10px);
    border-color: var(--accent);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.card-number {
    font-size: 3rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.1);
    margin-bottom: 15px;
    transition: var(--transition);
}

.service-card:hover .card-number {
    color: var(--accent);
    transform: translateX(5px);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--accent);
    display: inline;
    background-image: linear-gradient(#00dfc3, #00dfc3);
    background-size: 0% 2px;
    background-position: left bottom;
    background-repeat: no-repeat;
    transition: background-size 0.4s ease;
    padding-bottom: 4px;
}

.service-card:hover h3 {
    background-size: 100% 2px;
}

.service-card p {
    opacity: 0.8;
}

/* 4. Section Novedades */
.news-section {
    padding: 100px 0;
    background-color: var(--bg-light);
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.news-header h2 {
    font-size: 2.2rem;
    color: var(--primary-dark);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.news-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    cursor: pointer;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.news-image {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.1);
}

.news-content {
    padding: 25px;
}

.news-date {
    display: block;
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 10px;
}

.news-content h3 {
    font-size: 1.25rem;
    color: var(--primary-dark);
    margin-bottom: 15px;
}

.news-link {
    color: var(--primary-medium);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.news-link:hover {
    color: var(--accent);
    gap: 8px;
    /* subtle arrow movement */
}

/* 5. Section Contacto y Footer */
.footer-section {
    background: linear-gradient(135deg, var(--primary-dark), #004d56);
    color: var(--text-light);
    padding: 100px 0 20px;
    position: relative;
    overflow: hidden;
}

/* Decorative circle background */
.footer-section::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 80px;
    margin-bottom: 60px;
    position: relative;
    z-index: 1;
}

.footer-info h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.footer-info>p {
    font-size: 1.1rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.contact-details p {
    margin-bottom: 20px;
}

.map-placeholder {
    width: 100%;
    height: 200px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    transition: var(--transition);
}

.map-placeholder:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.wizard-card {
    background-color: var(--bg-white);
    padding: 40px;
    border-radius: 12px;
    color: var(--text-dark);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.wizard-card h3 {
    margin-bottom: 30px;
    color: var(--primary-dark);
}

/* Wizard Steps Visibility */
.step-content {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.step-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 223, 195, 0.1);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Responsiveness */
@media (max-width: 900px) {

    .about-section,
    .services-section,
    .news-section,
    .footer-section {
        padding: 60px 0;
    }

    .about-grid,
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .nav-links {
        display: none;
        /* In a real project, we'd add a hamburger menu */
    }

    .logo {
        margin: 0 auto;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* WordPress Support - Mobile Menu Styles */
#mobile-menu-overlay ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
    position: relative;
    z-index: 10;
}

#mobile-menu-overlay li {
    margin-bottom: 2rem;
}

#mobile-menu-overlay a {
    font-size: 1.875rem;
    /* text-3xl */
    font-weight: 800;
    /* font-extrabold */
    color: #ffffff;
    transition: color 0.3s;
    text-decoration: none;
}

#mobile-menu-overlay a:hover {
    color: var(--accent);
}

/* Timeline Styles (from about page) */
.timeline-img-container {
    overflow: hidden;
    border-radius: 1rem;
    box-shadow: 0 20px 40px -5px rgba(0, 96, 108, 0.2);
    margin-bottom: 1.5rem;
    transition: box-shadow 0.3s ease;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(0, 223, 195, 0.2);
    transform: translateX(-50%);
}

.timeline-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #00dfc3;
    transform-origin: top;
    transform: scaleY(0);
    transition: transform 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-section.active .timeline-line::after {
    transform: scaleY(1);
}

.timeline-item {
    position: relative;
    margin-bottom: 6rem;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Timeline */
@media (max-width: 768px) {
    .timeline-line {
        left: 2rem;
    }

    .timeline-item {
        padding-left: 4rem;
    }

    .timeline-dot {
        left: 2rem !important;
    }

    .timeline-content {
        width: 100% !important;
        text-align: left !important;
    }

    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 0;
        margin-right: 0;
    }
}

@media (min-width: 769px) {
    .timeline-item:nth-child(odd) .timeline-content {
        margin-left: auto;
        padding-left: 3rem;
        text-align: left;
    }

    .timeline-item:nth-child(even) .timeline-content {
        margin-right: auto;
        padding-right: 3rem;
        text-align: right;
    }

    .timeline-item {
        display: flex;
        width: 100%;
    }

    .timeline-item:nth-child(odd) {
        justify-content: flex-end;
    }

    .timeline-item:nth-child(even) {
        justify-content: flex-start;
    }

    .timeline-content {
        width: 50%;
    }

    .timeline-dot {
        left: 50% !important;
    }
}

/* Careers Page Forms */
.upload-area {
    background-image: url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='8' ry='8' stroke='%23019391FF' stroke-width='2' stroke-dasharray='8%2c 8' stroke-dashoffset='0' stroke-linecap='square'/%3e%3c/svg%3e");
    transition: all 0.3s ease;
}

.upload-area:hover,
.upload-area.dragover {
    background-image: url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='8' ry='8' stroke='%2300DFC3FF' stroke-width='3' stroke-dasharray='10%2c 10' stroke-dashoffset='0' stroke-linecap='square'/%3e%3c/svg%3e");
    background-color: rgba(0, 223, 195, 0.05);
    transform: scale(1.01);
}

.form-input {
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #00dfc3;
    box-shadow: 0 0 0 4px rgba(0, 223, 195, 0.1);
}

.form-input.valid {
    border-color: #00dfc3;
}

.form-input.invalid {
    border-color: #ef4444;
}

/* Contact Page Styles */
.map-frame iframe {
    filter: grayscale(100%) invert(92%) contrast(83%);
    transition: filter 0.3s ease;
}

.map-frame:hover iframe {
    filter: grayscale(0%) invert(0%);
}

/* 4. Section Novedades & Blog Cards */
.news-section {
    padding: 100px 0;
    background-color: var(--bg-light);
}

/* Ensure News Grid cards stretch to equal height */
.news-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

/* Make card a flex column */
.news-card {
    flex: 0 1 380px;
    /* Grow 0, Shrink 1, Basis 380px - Keeps them card-sized */
    width: 100%;
    max-width: 380px;
    /* Ensure they don't get huge on mobile if flex behaves oddly */
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Fill grid cell */
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.news-image {
    height: 220px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    /* Keep image height constant */
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.1);
}

.news-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    /* Allow content to fill space */
    justify-content: space-between;
    /* Space out content: Title top, Link bottom? */
    /* If user wants explicit vertical centering of ALL content block: */
    /* justify-content: center; */
}

/* But standard is top-aligned text, bottom-aligned button. Let's do that for neatness */

.news-date {
    display: block;
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 10px;
}

.news-content h3 {
    font-size: 1.25rem;
    color: var(--primary-dark);
    margin-bottom: 15px;
    flex-grow: 0;
}

/* The p text (excerpt) is usually here too, implied by HTML */

.news-link {
    color: var(--primary-medium);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
    margin-top: auto;
    /* Push to bottom if flex column */
}

/* Homepage Logo Slider Fix */
.logo-img-fix {
    filter: brightness(0) invert(1);
    opacity: 0.7;
    transition: opacity 0.3s ease;
    height: 25px !important;
    /* Made "super small" as requested (was 30px) */
    width: auto !important;
    max-width: 100px !important;
    object-fit: contain;
}

.logo-img-fix:hover {
    opacity: 1;
}

/* Brand Logo Carousel Section */
.brand-logos-section {
    background-color: #ffffff;
    padding: 60px 0;
    border-bottom: 1px solid #f5f5f5;
    text-align: center;
    /* Ensure contents are centered */
}

.brand-logos-section .brand-logos-title {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #cbd5e1;
    /* Lighter grey for premium look */
    margin: 0 auto 40px auto;
    /* Centered margin */
    display: block;
    width: 100%;
}

.brand-logos-section .swiper-wrapper {
    transition-timing-function: linear !important;
    align-items: center;
}

/* Pause animation on hover */
.brand-logos-section:hover .swiper-wrapper {
    animation-play-state: paused;
    /* Swiper handles this via JS usually, but we can hint cursor */
}

.brand-logos-section .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    /* Taller area */
    transition: opacity 0.3s ease;
}

/* Dim other logos when hovering the section */
.brand-logos-section:hover .swiper-slide {
    opacity: 0.3;
}

.brand-logos-section .swiper-slide:hover {
    opacity: 1;
    /* Highlight current */
}

.brand-logo-img {
    filter: grayscale(0%);
    opacity: 1;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    height: 65px;
    width: 150px;
    max-width: 100%;
    object-fit: contain;
    cursor: pointer;
}

.brand-logo-img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.15) translateY(-2px);
    drop-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}