/* --- GENERAL --- */
:root {
    /* Colores Bandera de Caraz + Tonos Modernos */
    --caraz-green: #008f39;      /* Verde Bandera (Fuerte) */
    --caraz-green-pastel: #e8f5e9; /* Verde Pastel (Fondos) */
    
    --caraz-celeste: #00b7eb;    /* Celeste Bandera */
    --caraz-celeste-pastel: #e1f5fe; /* Celeste Pastel (Fondos) */
    
    --white: #ffffff;
    --dark-text: #2c3e50;
    --gray-text: #666;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body { line-height: 1.6; color: var(--dark-text); background-color: var(--white); scroll-behavior: smooth; }
a { text-decoration: none; }
ul { list-style: none; }
.container { width: 90%; max-width: 1200px; margin: auto; }
.section-padding { padding: 60px 0; }
.section-title { text-align: center; font-size: 2.5rem; margin-bottom: 10px; color: var(--caraz-green); text-transform: uppercase; font-weight: bold; letter-spacing: 1px; }
.section-subtitle { text-align: center; margin-bottom: 45px; color: var(--gray-text); font-style: italic; font-size: 1.1rem; }

/* Fondos Alternados */
.bg-light { background-color: var(--caraz-green-pastel); } /* Fondo verde suave */

/* --- HEADER --- */
header { background: var(--white); box-shadow: 0 4px 20px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 1000; border-bottom: 4px solid var(--caraz-celeste); }
.nav-container { display: flex; justify-content: space-between; align-items: center; padding: 0.8rem 0; }

.brand-link { text-decoration: none; display: flex; align-items: center; }
.logo-area { display: flex; flex-direction: column; }
.logo { font-size: 1.8rem; font-weight: 900; color: var(--caraz-green); line-height: 1; letter-spacing: -0.5px; text-transform: uppercase; }
.subtitle { font-size: 0.85rem; color: var(--caraz-celeste); letter-spacing: 2px; text-transform: uppercase; font-weight: 600; margin-top: 2px; }

nav ul { display: flex; gap: 25px; }
nav a { color: var(--dark-text); font-weight: 600; transition: 0.3s; font-size: 0.95rem; }
nav a:hover { color: var(--caraz-celeste); }
.btn-nav { background: var(--caraz-green); color: var(--white); padding: 8px 20px; border-radius: 50px; transition: 0.3s; }
.btn-nav:hover { background: var(--caraz-celeste); color: white; box-shadow: 0 4px 10px rgba(0,183,235,0.3); }

/* --- HERO --- */
.hero {
    height: 85vh;
    position: relative;
    /* Imagen de fondo optimizada visualmente */
    background: url('https://source.unsplash.com/1600x900/?andes,mountain,lake,peru') no-repeat center center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}

/* MODIFICADO: Se quitó el fondo (background) para que la foto se vea 100% natural */
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: none; }

.hero-text { position: relative; z-index: 2; padding: 20px; max-width: 800px; }

/* MODIFICADO: Aumenté la sombra del texto (0.8) para que se lea bien incluso sobre nieve o nubes */
.hero h1 { font-size: 3.5rem; margin-bottom: 15px; text-shadow: 2px 2px 10px rgba(0,0,0,0.9); font-weight: 800; }
.hero p { font-size: 1.3rem; margin-bottom: 30px; text-shadow: 1px 1px 5px rgba(0,0,0,0.9); font-weight: 500; }

.hero-buttons { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }
.btn-primary { 
    background: var(--caraz-green); color: var(--white); 
    padding: 12px 30px; border-radius: 50px; 
    font-weight: bold; transition: 0.3s; 
    border: 2px solid var(--caraz-green); 
    box-shadow: 0 4px 15px rgba(0,143,57,0.3);
}
.btn-primary:hover { background: var(--white); color: var(--caraz-green); }
.btn-wsp-hero { 
    background: #25D366; color: white; 
    padding: 12px 30px; border-radius: 50px; 
    font-weight: bold; transition: 0.3s; 
    border: 2px solid #25D366;
}
.btn-wsp-hero:hover { background: transparent; border-color: #fff; }

/* --- ATRACTIVOS --- */
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 30px; }
.card { 
    background: var(--white); border-radius: 15px; 
    overflow: hidden; box-shadow: 0 10px 25px rgba(0,0,0,0.08); 
    border-bottom: 5px solid var(--caraz-celeste); 
    display: flex; flex-direction: column; 
    transition: transform 0.3s;
}
.card:hover { transform: translateY(-5px); }
.card-img { height: 200px; background-size: cover; background-position: center; }
.card-content { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; }
.card h3 { color: var(--caraz-green); margin-bottom: 10px; font-size: 1.3rem; }
.card p { font-size: 0.95rem; color: #666; margin-bottom: 20px; flex-grow: 1; line-height: 1.5; }

/* Botón INFO */
.btn-info { 
    display: block; 
    text-align: center; 
    background: var(--white); 
    color: var(--caraz-celeste); 
    border: 2px solid var(--caraz-celeste); 
    padding: 10px 0; 
    border-radius: 8px; 
    font-weight: bold; 
    transition: 0.3s; 
    margin-top: auto; 
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}
.btn-info:hover { background: var(--caraz-celeste); color: var(--white); }

/* --- CONSEJOS --- */
.consejos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.consejo-box { 
    background: var(--white); padding: 40px 30px; text-align: center; 
    border-radius: 20px; border: none; 
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}
.consejo-box:hover { transform: translateY(-5px); }
.icon-large { font-size: 3.5rem; color: var(--caraz-celeste); margin-bottom: 20px; }
.consejo-box h3 { margin-bottom: 15px; color: var(--dark-text); font-size: 1.4rem; }
.consejo-box p { margin-bottom: 20px; color: #777; }

.btn-ver-mas { 
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--caraz-green); font-weight: bold; 
    text-transform: uppercase; font-size: 0.9rem;
    transition: 0.3s;
}
.btn-ver-mas:hover { color: var(--caraz-celeste); gap: 12px; }

/* --- LOCALES --- */
.locales-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 25px; margin-bottom: 40px; }
.local-card { 
    background: var(--caraz-celeste-pastel); /* Fondo pastel azulado */
    border: none; padding: 25px; 
    border-radius: 12px; 
    border-left: 5px solid var(--caraz-green); 
}
.local-card h3 { font-size: 1.2rem; color: var(--dark-text); font-weight: 700; }
.local-detalles { display: flex; justify-content: flex-end; gap: 10px; margin-top: 15px; border-top: 1px solid rgba(0,0,0,0.05); padding-top: 15px; align-items: center; }
.local-detalles span { margin-right: auto; font-size: 0.85rem; color: #555; font-weight: 500; }
.btn-wsp-sm, .btn-map-sm { 
    width: 38px; height: 38px; 
    display: flex; align-items: center; justify-content: center; 
    border-radius: 50%; transition: 0.3s; color: white;
}
.btn-wsp-sm { background: #25D366; }
.btn-wsp-sm:hover { background: #1da851; transform: scale(1.1); }
.btn-map-sm { background: #4285F4; }
.btn-map-sm:hover { background: #3367d6; transform: scale(1.1); }

/* --- FOOTER --- */
.footer { background: var(--dark-text); color: var(--white); text-align: center; padding: 80px 0 30px; }
.contact-main { margin: 0 0 30px 0; font-size: 1.2rem; color: #aaa; }
.btn-wsp-big { 
    background: #25D366; color: var(--white); font-size: 1.3rem; 
    padding: 18px 40px; border-radius: 50px; 
    display: inline-flex; align-items: center; gap: 12px; 
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3); transition: 0.3s;
    font-weight: bold;
}
.btn-wsp-big:hover { background: #1ebc57; transform: scale(1.05); box-shadow: 0 15px 35px rgba(37, 211, 102, 0.4); }

.contact-numbers p { margin: 8px 0; color: #888; font-size: 0.9rem; }
.copyright { margin-top: 50px; font-size: 0.8rem; opacity: 0.5; border-top: 1px solid #444; padding-top: 20px; }

/* --- MOVIL (Pantallas menores a 768px) --- */
@media (max-width: 768px) {
    .nav-container { flex-direction: column; text-align: center; padding: 0.5rem 0; }
    .logo { font-size: 1.4rem; }
    .subtitle { font-size: 0.75rem; margin-top: 0; }
    nav ul { margin-top: 8px; flex-wrap: wrap; justify-content: center; gap: 10px; }
    nav a { font-size: 0.85rem; padding: 2px 5px; }
    .btn-nav { padding: 6px 15px; font-size: 0.85rem; }
    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1rem; }
    .grid-4 { grid-template-columns: 1fr; }
    .hero-text { padding: 10px; }
    .btn-wsp-big { font-size: 1rem; padding: 12px 25px; width: 100%; justify-content: center; }
}

/* --- ESTILOS PARA SUB-PÁGINAS DE DETALLE --- */
.breadcrumb-bar { background: #f0f0f0; padding: 15px 0; font-size: 0.9rem; border-bottom: 1px solid #ddd; }
.breadcrumb-bar a { color: var(--caraz-green); font-weight: 600; }
.breadcrumb-bar i { margin: 0 10px; font-size: 0.8rem; color: #999; }
.breadcrumb-bar .current { color: #666; }

.detail-hero {
    height: 50vh; 
    background-size: cover; background-position: center;
    position: relative;
    display: flex; align-items: flex-end;
}
.detail-hero::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); 
}
.detail-hero-content {
    position: relative; z-index: 2; width: 90%; max-width: 1200px; margin: 0 auto 40px; color: white;
}
.detail-hero-content h1 { font-size: 3rem; margin-bottom: 5px; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
.detail-hero-content p { font-size: 1.2rem; opacity: 0.9; }

.detail-layout {
    display: grid;
    grid-template-columns: 2fr 1fr; 
    gap: 40px;
    align-items: start;
}

.detail-content h2 { color: var(--caraz-green); margin-bottom: 20px; font-size: 2rem; }
.detail-content p { margin-bottom: 15px; font-size: 1.05rem; color: #444; text-align: justify; }
.detail-content h3 { color: var(--caraz-celeste); border-left: 4px solid var(--caraz-green); padding-left: 10px; margin: 30px 0 20px; font-size: 1.4rem; }
.mt-4 { margin-top: 2rem; }

.activities-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 15px; }
.activity-item { 
    background: var(--caraz-celeste-pastel); padding: 15px; border-radius: 8px; 
    text-align: center; color: var(--dark-text); font-weight: 600;
    transition: 0.3s;
}
.activity-item:hover { background: var(--caraz-celeste); color: white; transform: translateY(-3px); }
.activity-item i { display: block; font-size: 1.5rem; margin-bottom: 8px; color: var(--caraz-green); }
.activity-item:hover i { color: white; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.gallery-grid img { width: 100%; height: 150px; object-fit: cover; border-radius: 8px; transition: 0.3s; cursor: pointer; }
.gallery-grid img:hover { transform: scale(1.03); box-shadow: 0 4px 10px rgba(0,0,0,0.2); }

.check-list li { margin-bottom: 10px; padding-left: 25px; position: relative; }
.check-list li::before { 
    content: '\f00c'; font-family: 'Font Awesome 5 Free'; font-weight: 900; 
    position: absolute; left: 0; color: var(--caraz-green); 
}

.tech-card {
    background: white; border: 1px solid #eee; border-top: 5px solid var(--caraz-green);
    border-radius: 10px; padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    position: sticky; top: 100px; 
}
.tech-card h3 { color: var(--dark-text); margin-bottom: 20px; font-size: 1.3rem; text-align: center; }
.tech-list li { 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 12px 0; border-bottom: 1px solid #f0f0f0; font-size: 0.95rem; 
}
.tech-list li:last-child { border-bottom: none; }
.tech-list strong { color: #555; }
.tag-medium { background: #fff3cd; color: #856404; padding: 2px 8px; border-radius: 4px; font-size: 0.85rem; font-weight: bold; }

.sidebar-cta { text-align: center; margin-top: 20px; }
.sidebar-cta p { font-size: 0.9rem; margin-bottom: 10px; color: #666; }
.btn-wsp-full {
    display: block; width: 100%; background: #25D366; color: white; 
    padding: 12px; border-radius: 5px; font-weight: bold; text-align: center;
    transition: 0.3s;
}
.btn-wsp-full:hover { background: #1ebc57; }

@media (max-width: 768px) {
    .detail-layout { grid-template-columns: 1fr; } 
    .detail-hero { height: 40vh; }
    .detail-hero-content h1 { font-size: 2rem; }
    .tech-card { position: static; margin-bottom: 30px; order: -1; } 
}

/* --- ESTILOS PARA PÁGINA DE AGENCIAS --- */
.page-header { background: linear-gradient(135deg, var(--caraz-green), var(--caraz-celeste)); color: white; padding: 40px 0; text-align: center; }
.page-header h1 { font-size: 2.5rem; margin-bottom: 5px; }
.page-header p { font-size: 1.1rem; opacity: 0.9; }

.agencies-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.agency-card { background: white; border-radius: 15px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.08); transition: transform 0.3s, box-shadow 0.3s; border: 1px solid #f0f0f0; display: flex; flex-direction: column; }
.agency-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.12); }
.agency-header { background: #f9f9f9; padding: 20px; display: flex; align-items: center; gap: 15px; border-bottom: 1px solid #eee; }
.agency-logo { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; border: 2px solid white; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.agency-title h2 { font-size: 1.2rem; color: var(--dark-text); margin-bottom: 2px; }
.badge-verified { font-size: 0.75rem; color: var(--caraz-green); background: rgba(0, 143, 57, 0.1); padding: 2px 8px; border-radius: 20px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.agency-body { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }
.agency-body .description { font-size: 0.9rem; color: #666; margin-bottom: 15px; line-height: 1.5; flex-grow: 1; }
.contact-list li { font-size: 0.9rem; color: var(--dark-text); margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.contact-list i { color: var(--caraz-celeste); width: 20px; text-align: center; }
.agency-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.btn-action { padding: 10px; border-radius: 8px; text-align: center; font-size: 0.9rem; font-weight: 600; transition: 0.2s; display: flex; align-items: center; justify-content: center; gap: 6px; }
.btn-whatsapp { background: #25D366; color: white; border: 1px solid #25D366; }
.btn-whatsapp:hover { background: #1ebc57; }
.btn-location { background: white; color: var(--dark-text); border: 1px solid #ddd; }
.btn-location:hover { background: #f0f0f0; border-color: #ccc; }

/* --- LIGHTBOX / MODAL GALERÍA (ESTO ES LO QUE TE FALTABA O ESTABA DAÑADO) --- */
.modal {
    display: none; /* Se oculta por defecto */
    position: fixed; /* Se fija a la pantalla */
    z-index: 2000; /* Siempre encima */
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.9); /* Fondo Negro Transparente */
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(255,255,255,0.2);
    animation: zoomIn 0.3s;
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2001;
}
.close:hover, .close:focus { color: var(--caraz-celeste); text-decoration: none; cursor: pointer; }

@keyframes zoomIn { from {transform:scale(0.8); opacity: 0;} to {transform:scale(1); opacity: 1;} }
@keyframes fadeIn { from {background-color: rgba(0,0,0,0);} to {background-color: rgba(0,0,0,0.9);} }

@media only screen and (max-width: 700px){
    .modal-content { width: 95%; }
    .close { top: 10px; right: 20px; font-size: 30px; }
}

/* --- BOTONES DE NAVEGACIÓN GALERÍA --- */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 20px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 40px;
    transition: 0.3s ease;
    border-radius: 0 5px 5px 0;
    user-select: none;
    z-index: 2002;
    background-color: rgba(0,0,0,0.1);
}
.next { right: 0; border-radius: 5px 0 0 5px; }
.prev { left: 0; border-radius: 3px 0 0 3px; }
.prev:hover, .next:hover { background-color: rgba(0, 0, 0, 0.8); color: var(--caraz-celeste); transform: scale(1.1); }

#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
    font-size: 1.1rem;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}
@media only screen and (max-width: 700px){
    .prev, .next { font-size: 24px; padding: 15px; background-color: rgba(0,0,0,0.3); }
    #caption { font-size: 0.9rem; }
}