/* ==========================================================================
   TAYLOR CONSTRUCTION - v4.0 (FINAL A PRODUCCION)
   ========================================================================== */

/* FUENTES LOCALES */
@font-face {
    font-family: 'Aquire';
    src: url('../assets/fonts/Aquire-BW0ox.otf') format('opentype');
    font-weight: normal;
}
@font-face {
    font-family: 'Aquire';
    src: url('../assets/fonts/AquireBold-8Ma60.otf') format('opentype');
    font-weight: bold;
}
@font-face {
    font-family: 'Aquire';
    src: url('../assets/fonts/AquireLight-YzE0o.otf') format('opentype');
    font-weight: 300;
}

:root {
    --primary: #db1414;
    --accent: #18379a;
    --dark: #0f172a;
    --light: #F8F9FA;
    --gray: #1e293b;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px; 
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--dark);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- NAVBAR --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5%;
    background: rgba(15, 23, 42, 0.98);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: var(--transition);
}

.logo { 
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    margin-right: 20px;
    max-width: 800px;
}

.logo img {
    height: auto;
    width: 100%;
    display: block;
    transition: var(--transition);
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary);
    border-radius: 2px;
}

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

.nav-links li a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 700;
    transition: var(--transition);
}

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

.btn-cta {
    background: var(--primary);
    color: white !important;
    padding: 10px 18px;
    border-radius: 4px;
    margin-left: 20px;
}

/* --- HERO SECTION --- */
.hero {
    min-height: 100vh;
    padding-top: 150px;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), 
                url('https://images.unsplash.com/photo-1541913054-2114946317b4?q=80&w=2070&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.marines-logo {
    width: 100%;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.marines-logo img {
    height: 180px; 
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.5));
}

.badge-veteran {
    display: inline-block;
    border: 1px solid var(--primary);
    padding: 8px 20px;
    margin-bottom: 25px;
}

.badge-veteran p {
    color: var(--primary);
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.85rem;
    margin: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.flag-svg {
    width: 24px;
    height: auto;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.3));
}

.hero-content h1 { 
    font-size: clamp(2rem, 8vw, 4.5rem); 
    font-family: 'Oswald', sans-serif; 
    text-transform: uppercase; 
    line-height: 1.1; 
    margin-bottom: 20px; 
}

.hero-content h1 span { color: var(--primary); }

.hero-desc {
    margin-bottom: 40px !important;
    display: block;
}

.btn-primary {
    background: var(--primary);
    color: white;
    padding: 18px 35px;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-block;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

/* --- SECTIONS GENERAL --- */
section { padding: 100px 8%; text-align: center; }

.section-title { 
    font-family: 'Oswald', sans-serif; 
    font-size: 3rem; 
    margin-bottom: 50px; 
    text-transform: uppercase; 
}

.section-title span { color: var(--primary); }

/* --- SERVICES --- */
#services { 
    position: relative;
    background: linear-gradient(rgba(15, 23, 42, 0.75), rgba(15, 23, 42, 0.75)), 
                url('../img/service-background.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.services-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 20px; 
}

/* --- WHY US --- */
.why-us { background-color: var(--light); color: var(--dark); }

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

.value-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 20px;
    display: block;
}

.value-item:hover .value-icon {
    transform: scale(1.1);
    transition: var(--transition);
}

.value-item h3 { 
    font-family: 'Oswald', sans-serif; 
    margin-bottom: 15px; 
    text-transform: uppercase; 
    color: var(--accent); 
}

/* --- GALLERY --- */
.modern-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
    gap: 20px; 
    margin-bottom: 30px;
    width: 100%;
}

.gallery-card { 
    height: 300px; 
    width: 100%;
    border-radius: 8px; 
    overflow: hidden; 
    cursor: pointer;
    border: 1px solid #334155;
}

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

.gallery-card:hover img { transform: scale(1.05); }

/* --- COMMUNITY & CONTACT --- */
.community-section { background-color: var(--light); color: var(--dark); }

.community-flex { display: flex; flex-wrap: wrap; align-items: center; gap: 50px; }

.community-text { flex: 1; min-width: 300px; text-align: left; }

.community-images { 
    flex: 1; 
    min-width: 300px; 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 15px; 
}

.img-wrapper { border-radius: 8px; overflow: hidden; height: 250px; }

.img-wrapper.offset { margin-top: 40px; }

.contact-section { background: #0a1120; text-align: left; }

.contact-container { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); 
    gap: 50px; 
}

#contact-form { 
    background: var(--gray); 
    padding: 40px; 
    border-radius: 8px; 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
}

#contact-form input, #contact-form textarea { 
    padding: 15px; 
    background: #243347; 
    border: 1px solid #334155; 
    color: white; 
    border-radius: 4px; 
}

.main-footer { 
    text-align: center; 
    padding: 60px 0 30px; 
    color: #777; 
    border-top: 1px solid #1e293b; 
    margin-top: 60px; 
}

.social-links { 
    margin-bottom: 30px; 
    display: flex; 
    justify-content: center; 
    gap: 30px; 
}

.social-links a { color: white; font-size: 1.8rem; }

.irisbyte-tag a {
    color: #ffffff !important; 
    text-decoration: none !important;
}
.irisbyte-tag a:hover { color: var(--primary) !important; }

/* --- RESPONSIVE LOGIC --- */
.burger { 
    display: none; 
    cursor: pointer; 
    z-index: 1200; /* Mayor que el menú para poder cerrar */
    position: relative;
}

.burger div { 
    width: 25px; 
    height: 3px; 
    background-color: white; 
    margin: 5px; 
    transition: var(--transition); 
}

@media screen and (max-width: 1250px) {
	.marines-logo img { height: 150px; }
    .logo { flex: none; margin-right: 10px; }
    .logo img { width: 100%; max-width: 400px; }
    .burger { display: block; margin-left: auto; }

    .nav-links {
        position: fixed; 
        right: 0; 
        top: 0; 
        left: 0; /* Asegura que empiece desde la izquierda */
        height: 100vh; 
        width: 100%;
        background-color: var(--dark); 
        transform: translateX(100%);
        transition: transform 0.5s ease; 
        display: flex; 
        flex-direction: column;
        justify-content: center; 
        align-items: center;
        margin: 0;
        padding: 0;
        z-index: 1100;
    }
    
    .nav-active { transform: translateX(0%); }
    .nav-links li { margin: 20px 0; width: 100%; text-align: center; }
    .nav-links li a { margin-left: 0; font-size: 1.2rem; }
}

@media screen and (max-width: 768px) {
	.logo { flex: 1; margin-right: 10px; }
    .hero { padding-top: 180px; align-items: flex-start; }
    .marines-logo img { height: 120px; }
    .badge-veteran p { gap: 8px; font-size: 0.75rem; }

    #services {
        background: linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.85)), 
                    url('../img/service-background2.jpg') !important;
        background-attachment: scroll !important;
        background-size: cover !important;
        padding: 40px 5% !important;
    }

    /* Tarjeta Colapsada (Acordeón) */
    .service-card {
        max-height: 80px !important; /* Ajuste para que no se vea cortada al inicio */
        overflow: hidden;
        transition: max-height 0.5s ease-in-out, opacity 0.6s ease-out, transform 0.6s ease-out;
        cursor: pointer;
        margin-bottom: 12px !important;
        padding: 15px 20px !important;
        display: flex;
        flex-direction: column;
        opacity: 0; /* Para el reveal */
        transform: translateY(30px); /* Para el reveal */
    }

    .service-card .service-main-icon {
        font-size: 1.5rem;
        margin-bottom: 0;
        margin-right: 15px;
    }

    .service-card h3 {
        display: flex;
        align-items: center;
        width: 100%;
        border-bottom: none;
        font-size: 1.1rem;
    }

    .service-card h3::after {
        content: '▼';
        margin-left: auto;
        font-size: 0.8rem;
        color: var(--primary);
        transition: transform 0.3s;
    }

    .service-card.active { max-height: 1000px !important; background: rgba(30, 41, 59, 0.98); }
    .service-card.active h3 { border-bottom: 2px solid var(--primary); padding-bottom: 10px; }
    .service-card.active h3::after { transform: rotate(180deg); }
    .service-card.active .service-main-icon { font-size: 2.5rem; margin-bottom: 15px; }
}

/* === LIGHTBOX === */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
}

.lightbox-overlay img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.close-lightbox {
    position: absolute;
    top: 20px; right: 30px;
    font-size: 40px; color: white;
    cursor: pointer;
    font-weight: bold;
}

/* =========================================
   ANIMACIONES Y ESTADOS DE SERVICIOS
   ========================================= */

/* Estado inicial para Desktop */
.service-card {
    background: rgba(30, 41, 59, 0.95);
    padding: 40px 25px;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border-bottom: 4px solid var(--accent);
    transition: all 0.6s ease-out;
    backdrop-filter: blur(5px);
    opacity: 0;
    transform: translateY(30px);
}

.service-card.reveal {
    opacity: 1;
    transform: translateY(0);
}

.service-card:hover { 
    border-bottom: 4px solid var(--primary); 
    background: #243347; 
    transform: translateY(-5px); 
}

.service-main-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.service-card h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: white;
    border-bottom: 2px solid var(--primary);
    width: 100%;
    padding-bottom: 10px;
}

.service-list {
    list-style: none;
    width: 100%;
}

.service-list li {
    font-size: 0.9rem;
    margin-bottom: 8px;
    padding-left: 25px;
    position: relative;
    color: #cbd5e1;
    transition: var(--transition);
}

.service-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

.service-list li:hover {
    color: white;
    transform: translateX(5px);
}

/* Delays para cascada */
.service-card:nth-child(1) { transition-delay: 0.1s; }
.service-card:nth-child(2) { transition-delay: 0.3s; }
.service-card:nth-child(3) { transition-delay: 0.5s; }

/* 1. Botón "Free Estimate" y "Explore Services" */
.btn-cta, .btn-primary {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-cta:hover, .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    filter: brightness(1.1);
}

/* 2. Botón "Send Message" */
.btn-primary.full-width {
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.btn-primary.full-width:hover {
    letter-spacing: 2px;
    background-color: #bf0a30;
    color: #fff;
}

/* 3. Logos de Redes Sociales */
.social-links a {
    display: inline-block;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.social-links a.fb:hover { color: #1877F2; transform: scale(1.3) rotate(8deg); }
.social-links a.ig:hover { color: #E4405F; transform: scale(1.3) rotate(-8deg); }
.social-links a.tk:hover { color: #db1414; transform: scale(1.3) translateY(-5px); }

/* 4. Badge de Veterano */
.badge-veteran {
    animation: fadeInSlide 1s ease-out forwards;
}

@keyframes fadeInSlide {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}