/* ===========================
   VARIABLES Y ESTILOS GLOBALES
   =========================== */

:root {
    --primary-color: #0066cc;
    --primary-dark: #0052a3;
    --secondary-color: #00a8e8;
    --accent-color: #ff6b35;
    --text-dark: #1a1a1a;
    --text-light: #666;
    --bg-light: #f5f5f5;
    --bg-white: #ffffff;
    --border-color: #ddd;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===========================
   NAVEGACIÓN
   =========================== */

.navbar {
    background-color: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-logo i {
    font-size: 28px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    transition: all 0.3s ease;
}

/* ===========================
   HERO SECTION
   =========================== */

.hero {
    position: relative;
    height: 100vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: white;
    animation: fadeInUp 1s ease;
}

.hero-content h1 {
    font-size: 72px;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 24px;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================
   BOTONES
   =========================== */

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===========================
   SECCIÓN SERVICIOS
   =========================== */

.servicios {
    padding: 80px 0;
    background-color: var(--bg-light);
}

.servicios h2,
.trabajos h2,
.contacto h2 {
    font-size: 48px;
    text-align: center;
    margin-bottom: 60px;
    color: var(--primary-color);
}

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.servicio-card {
    background-color: var(--bg-white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    text-align: center;
}

.servicio-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.servicio-icon {
    font-size: 50px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.servicio-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.servicio-card p {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.8;
}

.servicio-lista {
    list-style: none;
    text-align: left;
}

.servicio-lista li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-light);
}

.servicio-lista li:last-child {
    border-bottom: none;
}

.servicio-lista li:before {
    content: "✓ ";
    color: var(--secondary-color);
    font-weight: bold;
    margin-right: 10px;
}

/* ===========================
   SECCIÓN TRABAJOS
   =========================== */

.trabajos {
    padding: 80px 0;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--primary-color);
    background-color: transparent;
    color: var(--primary-color);
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
}

.galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.galeria-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    aspect-ratio: 1 / 1;
    cursor: pointer;
    background-color: #000;
}

.galeria-item img,
.galeria-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.galeria-item:hover img,
.galeria-item:hover video {
    transform: scale(1.05);
}

.galeria-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.galeria-item:hover .galeria-overlay {
    opacity: 1;
}

.galeria-overlay i {
    font-size: 40px;
    color: white;
}

.galeria-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--accent-color);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    z-index: 5;
}

/* ===========================
   MODAL
   =========================== */

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    margin: auto;
    display: block;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translate(-50%, -60%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

.modal-video,
.modal-img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.modal-img {
    display: none;
}

.modal-video.hide {
    display: none;
}

.modal-img.show {
    display: block;
}

.close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--accent-color);
}

/* ===========================
   SECCIÓN CONTACTO
   =========================== */

.contacto {
    padding: 80px 0;
    background-color: var(--bg-light);
}

.contacto-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-top: 50px;
}

.contacto-info h3 {
    font-size: 24px;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.info-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    align-items: flex-start;
}

.info-item i {
    font-size: 24px;
    color: var(--secondary-color);
    margin-top: 5px;
}

.info-item p {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.info-item a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 16px;
}

.info-item a:hover {
    text-decoration: underline;
}

.contacto-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

/* ===========================
   FOOTER
   =========================== */

.footer {
    background-color: var(--text-dark);
    color: white;
    padding: 40px 0;
    text-align: center;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    color: white;
    font-size: 24px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--secondary-color);
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */

@media (max-width: 768px) {
    /* Navegación */
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        left: 0;
        top: 70px;
        flex-direction: column;
        background-color: var(--bg-white);
        width: 100%;
        text-align: center;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        box-shadow: var(--shadow);
    }

    .nav-menu.active {
        max-height: 400px;
    }

    .nav-menu li {
        padding: 15px 0;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(10px, 10px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -8px);
    }

    /* Hero */
    .hero {
        height: 60vh;
        min-height: 400px;
    }

    .hero-content h1 {
        font-size: 42px;
    }

    .hero-content p {
        font-size: 18px;
    }

    /* Títulos */
    .servicios h2,
    .trabajos h2,
    .contacto h2 {
        font-size: 36px;
    }

    /* Servicios */
    .servicios {
        padding: 50px 0;
    }

    .servicios-grid {
        grid-template-columns: 1fr;
    }

    .servicio-card {
        padding: 30px;
    }

    /* Trabajos */
    .trabajos {
        padding: 50px 0;
    }

    .galeria-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }

    /* Contacto */
    .contacto {
        padding: 50px 0;
    }

    .contacto-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    /* Footer */
    .footer .container {
        flex-direction: column;
        gap: 20px;
    }

    .close {
        top: 15px;
        right: 15px;
        font-size: 28px;
    }

    .modal-content {
        width: 95%;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 32px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .servicios h2,
    .trabajos h2,
    .contacto h2 {
        font-size: 28px;
        margin-bottom: 40px;
    }

    .servicio-card h3 {
        font-size: 20px;
    }

    .galeria-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }

    .filter-buttons {
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 15px;
        font-size: 12px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .nav-container {
        height: 60px;
    }

    .nav-logo {
        font-size: 18px;
    }

    .nav-logo i {
        font-size: 22px;
    }
}

/* ===========================
   UTILIDADES
   =========================== */

.hidden {
    display: none !important;
}

.active {
    display: block;
}
