/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    z-index: -2;
    pointer-events: none !important;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
    background-color: #1f2d3d;
}

/* Mobile video optimizations */
@media (max-width: 768px) {
    .hero-video {
        object-fit: cover;
        object-position: center center;
        width: 100vw;
        height: 100vh;
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(31, 45, 61, 0.4);
    z-index: -1;
}

.hero-content {
    text-align: center;
    z-index: 1;
}

/* Liquid Glass Card */
.liquid-glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: clamp(20px, 4vw, 30px);
    padding: clamp(40px, 8vw, 60px) clamp(30px, 6vw, 40px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    max-width: clamp(500px, 80vw, 600px);
    margin: 0 clamp(20px, 4vw, 30px);
}

.liquid-glass-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(249, 168, 37, 0.1), transparent);
    animation: liquidMove 6s ease-in-out infinite;
    animation-fill-mode: both;
    animation-play-state: running;
    z-index: -1;
}

.liquid-glass-card h1 {
    font-size: clamp(2.5rem, 6vw, 3rem);
    font-weight: 700;
    color: var(--primary-light);
    margin-bottom: clamp(15px, 3vw, 20px);
    line-height: 1.2;
}

.liquid-glass-card p {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    color: var(--primary-light);
    opacity: 0.9;
    line-height: 1.6;
}

@keyframes liquidMove {
    0%, 70% { 
        transform: translate(-80%, 80%); 
        opacity: 0; 
    }
    75% { 
        transform: translate(-50%, 50%); 
        opacity: 0.3; 
    }
     85% { 
        transform: translate(0%, 0%); 
        opacity: 0.8; 
    }
    95% { 
        transform: translate(50%, -50%); 
        opacity: 0.3; 
    }
    100% { 
        transform: translate(80%, -80%); 
        opacity: 0; 
    }
}

/* Wave Separator */
.wave-separator {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.wave-separator svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 120px;
}

.wave-separator .shape-fill {
    fill: var(--primary-light);
}

/* Services Section */
.services {
    padding: 100px 0;
    background: var(--primary-light);
}

/* Services Accordion Gallery */
.services-accordion {
    display: flex;
    height: clamp(400px, 50vh, 500px);
    border-radius: clamp(20px, 4vw, 25px);
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25),
                0 5px 15px rgba(0, 0, 0, 0.1);
    margin: clamp(2rem, 5vw, 3rem) 0;
    position: relative;
    background: rgba(31, 45, 61, 0.05);
    border: 1px solid rgba(249, 168, 37, 0.1);
    animation: subtle-pulse 4s ease-in-out infinite;
}

@keyframes subtle-pulse {
    0%, 100% {
        box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25),
                    0 5px 15px rgba(0, 0, 0, 0.1);
    }
    50% {
        box-shadow: 0 18px 55px rgba(0, 0, 0, 0.28),
                    0 8px 20px rgba(249, 168, 37, 0.15);
    }
}

.services-accordion::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(249, 168, 37, 0.03) 0%, 
        transparent 25%, 
        transparent 75%, 
        rgba(249, 168, 37, 0.03) 100%);
    pointer-events: none;
    z-index: 1;
    animation: gradient-shift 6s ease-in-out infinite;
}

@keyframes gradient-shift {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.services-accordion:hover .accordion-panel:not(:hover) {
    flex: 0.8;
    filter: brightness(0.8);
    transition: flex 0.7s cubic-bezier(0.23, 1, 0.32, 1), 
                filter 0.4s ease;
}

.accordion-panel {
    position: relative;
    flex: 1;
    transition: flex 0.8s cubic-bezier(0.23, 1, 0.32, 1), 
                transform 0.4s ease,
                box-shadow 0.4s ease;
    cursor: pointer;
    overflow: hidden;
    will-change: flex, transform;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.accordion-panel:last-child {
    border-right: none;
}

.accordion-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(249, 168, 37, 0.1) 0%, 
        transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 2;
    pointer-events: none;
}

.accordion-panel:hover {
    flex: 3;
    transform: translateY(-3px) scale(1.02);
    z-index: 10;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3),
                0 10px 25px rgba(249, 168, 37, 0.2);
}

.accordion-panel:hover::before {
    opacity: 1;
}

.accordion-panel:not(:hover) {
    transform: translateY(0) scale(1);
}

/* Interactive indicator */
.panel-content::after {
    content: '⬅';
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%) rotate(90deg);
    font-size: 1.5rem;
    color: var(--accent-color);
    opacity: 0.7;
    transition: all 0.3s ease;
    font-weight: 300;
}

.accordion-panel:hover .panel-content::after {
    opacity: 0;
    transform: translateY(-50%) rotate(90deg) scale(0);
}

.accordion-panel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                filter 0.4s ease;
    will-change: transform, filter;
    filter: brightness(0.9) contrast(1.1);
}

.accordion-panel:hover img {
    transform: scale(1.12) rotate(0.5deg);
    filter: brightness(1) contrast(1.2) saturate(1.1);
}

.panel-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, 
                               rgba(31, 45, 61, 0.7) 20%, 
                               rgba(31, 45, 61, 0.95) 70%,
                               rgba(31, 45, 61, 1));
    color: white;
    padding: 1.5rem 1rem;
    transform: translateY(0);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform;
    backdrop-filter: blur(8px) saturate(1.2);
    text-align: center;
    border-top: 2px solid rgba(249, 168, 37, 0.3);
}

.panel-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--accent-color), 
        transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.accordion-panel:hover .panel-content {
    transform: translateY(0);
    padding: 3rem 2rem 2rem;
    text-align: left;
    backdrop-filter: blur(12px) saturate(1.3);
}

.accordion-panel:hover .panel-content::before {
    opacity: 1;
}

.panel-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    color: var(--accent-color);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.panel-content h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), #ffb74d);
    border-radius: 2px;
    transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s;
}

.accordion-panel:hover .panel-content h3 {
    font-size: 2.2rem;
    margin: 0 0 1.5rem 0;
    transform: translateX(8px);
}

.accordion-panel:hover .panel-content h3::after {
    width: 60px;
}

.services-accordion:hover .accordion-panel:not(:hover) .panel-content h3 {
    font-size: 0.9rem;
    opacity: 0.8;
}

.panel-content p {
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transform: translateY(15px);
    transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.15s,
                transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.15s,
                max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.15s;
}

.accordion-panel:hover .panel-content p {
    opacity: 1;
    max-height: 200px;
    margin: 0 0 1.5rem 0;
    transform: translateY(0);
}

.panel-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transform: translateY(15px);
    transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.25s,
                transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.25s,
                max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.25s;
}

.accordion-panel:hover .panel-content ul {
    opacity: 1;
    max-height: 300px;
    transform: translateY(0);
}

.panel-content ul li {
    padding: 0.3rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.9rem;
}

.panel-content ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

/* Panel specific colors */
.accordion-panel[data-service="arquitectura"] .panel-content {
    background: linear-gradient(transparent, rgba(31, 45, 61, 0.9) 40%, rgba(31, 45, 61, 0.95));
}

.accordion-panel[data-service="ingenieria"] .panel-content {
    background: linear-gradient(transparent, rgba(41, 55, 71, 0.9) 40%, rgba(41, 55, 71, 0.95));
}

.accordion-panel[data-service="construccion"] .panel-content {
    background: linear-gradient(transparent, rgba(51, 65, 81, 0.9) 40%, rgba(51, 65, 81, 0.95));
}

/* Services CTA Button */
.services-cta {
    text-align: center;
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid rgba(31, 45, 61, 0.1);
}

/* About Section */
.about {
    padding: 100px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    margin-top: 50px;
    align-items: start;
}

.office-card {
    background: var(--primary-light);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    height: fit-content;
}

.office-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.office-card img {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.office-content {
    padding: 30px;
}

.office-content p {
    font-size: 1.2rem;
    line-height: 1.6;
    margin: 0;
}

.employees-column {
    display: flex;
    flex-direction: column;
    gap: 25px;
    height: 100%;
}

.employee-card {
    background: var(--primary-light);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.employee-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.employee-content {
    display: flex;
    align-items: center;
    padding: 20px;
    gap: 20px;
    width: 100%;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
}

.employee-card:hover .employee-content {
    transform: translateY(-100%);
}

.employee-card img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 15px;
    flex-shrink: 0;
}

.employee-card[data-employee="1"] img {
    object-position: 50% 20%;
}

.employee-card[data-employee="2"] img {
    object-position: 50% 10%;
}

.employee-info {
    flex: 1;
    text-align: left;
}

.employee-info h4 {
    font-size: 1.3rem;
    color: var(--primary-dark);
    margin-bottom: 5px;
}

.employee-info span {
    color: var(--text-light);
    font-size: 0.95rem;
}

.employee-hover {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(31, 45, 61, 0.95);
    color: var(--primary-light);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 30px;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.employee-card:hover .employee-hover {
    transform: translateY(0);
}

.employee-hover p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.employee-hover a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 10px 20px;
    border: 2px solid var(--accent-color);
    border-radius: 25px;
    transition: var(--transition);
}

.employee-hover a:hover {
    background: var(--accent-color);
    color: var(--primary-dark);
}

/* About CTA Button */
.about-cta {
    text-align: center;
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid rgba(31, 45, 61, 0.1);
}
