/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1e3a5f;
    --primary-light: #2d5a8a;
    --primary-dark: #0f1f33;
    --accent: #2563eb;
    --text: #334155;
    --text-light: #64748b;
    --text-white: #ffffff;
    --bg: #ffffff;
    --bg-light: #f1f5f9;
    --bg-dark: #0f172a;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: var(--bg);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    transition: var(--transition);
    padding: 16px 0;
}

.header.scrolled {
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
    padding: 12px 0;
}

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

.logo {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-img {
    height: 50px;
    width: auto;
    border-radius: 8px;
    transition: var(--transition);
}

.header.scrolled .logo-img {
    height: 40px;
}

/* Navigation */
.nav {
    display: flex;
    gap: 8px;
}

.nav-link {
    color: var(--text-white);
    font-size: 14px;
    font-weight: 500;
    padding: 10px 18px;
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 60%;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.1);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-white);
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    padding: 100px 24px 24px;
    flex-direction: column;
    gap: 8px;
    z-index: 999;
    align-items: center;
    justify-content: flex-start;
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu .nav-link {
    font-size: 18px;
    padding: 16px 32px;
    width: 100%;
    text-align: center;
}

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

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: zoomIn 20s ease-in-out infinite alternate;
}

@keyframes zoomIn {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 800px;
    padding: 0 24px;
    animation: fadeInUp 1s ease;
}

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

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 24px;
    line-height: 1.1;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    line-height: 1.7;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 36px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, #1d4ed8 100%);
    color: var(--text-white);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
}

.btn-full {
    width: 100%;
}

/* Sections */
.section {
    padding: 100px 0;
}

.section-header {
    margin-bottom: 56px;
    text-align: center;
}

.section-label {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 16px;
    padding: 8px 16px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 20px;
}

.section-title {
    font-size: clamp(1.25rem, 3vw, 1.6rem);
    font-weight: 400;
    color: var(--text-light);
    max-width: 700px;
    line-height: 1.7;
    margin: 0 auto;
}

.subsection-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
    margin: 48px 0 24px;
    text-align: center;
}

/* Nosotros Section */
.nosotros {
    background: var(--bg);
}

.nosotros-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.nosotros-text {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.nosotros-text p {
    font-size: 1.125rem;
    color: var(--text);
    line-height: 1.8;
}

.nosotros-text strong {
    color: var(--accent);
    font-weight: 600;
}

.nosotros-image {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.nosotros-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.nosotros-image:hover img {
    transform: scale(1.05);
}

/* Servicios Section */
.servicios {
    background: var(--bg-light);
}

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.servicio-card {
    background: var(--bg);
    padding: 36px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
    text-align: center;
}

.servicio-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.servicio-icon {
    width: 64px;
    height: 64px;
    color: var(--accent);
    margin: 0 auto 24px;
}

.servicio-icon svg {
    width: 100%;
    height: 100%;
}

.servicio-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 12px;
}

.servicio-desc {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* Trabajos Section */
.trabajos {
    background: var(--bg);
}

/* Videos Section */
.videos-section {
    margin-bottom: 48px;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.video-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--bg-dark);
}

.video-card video {
    width: 100%;
    height: auto;
    display: block;
}

.video-label {
    display: block;
    padding: 16px;
    background: var(--primary);
    color: var(--text-white);
    font-weight: 500;
    text-align: center;
}

/* Trabajos Grid */
.trabajos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.trabajo-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.trabajo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.trabajo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, transparent 100%);
    opacity: 0;
    transition: var(--transition);
}

.trabajo-card:hover .trabajo-overlay {
    opacity: 1;
}

.trabajo-title {
    color: var(--text-white);
    font-size: 1.1rem;
    font-weight: 600;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.modal.active {
    display: block;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    border-radius: 12px;
    animation: zoomInModal 0.3s ease;
}

@keyframes zoomInModal {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--accent);
}

.modal-caption {
    margin: 20px auto;
    text-align: center;
    color: #ccc;
    font-size: 1.1rem;
    max-width: 80%;
}

/* Contacto Section */
.contacto {
    background: var(--bg-light);
}

.contacto-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.contacto-info {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.contacto-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 24px;
    background: var(--bg);
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.contacto-item:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-lg);
}

.contacto-icon {
    width: 52px;
    height: 52px;
    color: var(--accent);
    flex-shrink: 0;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 12px;
    padding: 12px;
}

.contacto-icon svg {
    width: 100%;
    height: 100%;
}

.contacto-detail {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.contacto-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contacto-value {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary);
}

.contacto-form-wrapper {
    background: var(--bg);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.form-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 28px;
    text-align: center;
}

.contacto-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.form-group input,
.form-group textarea {
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    transition: var(--transition);
    background: var(--bg);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #94a3b8;
}

/* Footer */
.footer {
    background: var(--bg-dark);
    padding: 48px 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.footer-logo {
    height: 60px;
    border-radius: 12px;
}

.copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    text-align: center;
}

/* Responsive */
@media (max-width: 992px) {
    .nosotros-content,
    .contacto-content {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .nosotros-image {
        order: -1;
    }

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

@media (max-width: 768px) {
    .nav {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .section {
        padding: 64px 0;
    }

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

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

    .contacto-form-wrapper {
        padding: 24px;
    }

    .contacto-item {
        padding: 18px;
    }
}

@media (max-width: 480px) {
    .trabajos-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }
}

/* Scroll animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

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

/* Loading state */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    100% { left: 100%; }
}
