/* --- VARIABLES Y RESET --- */
:root {
    --primary-blue: #003b8e;
    --secondary-blue: #0056b3;
    --accent-yellow: #ffcc00;
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #f4f6f9;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    overflow-x: hidden;
    padding-top: 30px; /* Espacio para la barra superior */
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; outline: none; }

/* --- MARCA DE AGUA (REQUERIMIENTO ESPECIAL) --- */
#watermark {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    pointer-events: none; /* Permite hacer clic en la página de fondo */
    background: rgba(0, 59, 142, 0.15);
    backdrop-filter: blur(2px);
}

#watermark h1 {
    font-size: 5rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    text-align: center;
    transform: rotate(-30deg);
    text-shadow: 
        2px 2px 0 #000,
        -2px -2px 0 #000,
        2px -2px 0 #000,
        -2px 2px 0 #000,
        0px 0px 20px rgba(0,0,0,0.8);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 5px;
    max-width: 90%;
}

/* --- BARRA SUPERIOR --- */
.top-bar {
    background-color: var(--primary-blue);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 40px;
    font-size: 12px;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 100;
}
.top-bar-left, .top-bar-right { display: flex; align-items: center; gap: 15px; }
.top-bar i { margin-right: 5px; }

/* --- NAVBAR --- */
.navbar {
    background-color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    position: relative;
    z-index: 100;
}

.logo { display: flex; flex-direction: column; }
.logo-text { font-size: 28px; font-weight: 800; color: var(--primary-blue); font-style: italic; }
.logo-text span { color: var(--accent-yellow); }
.logo-subtext { font-size: 11px; color: var(--text-light); letter-spacing: 1px; }

.nav-links { display: flex; gap: 20px; font-size: 14px; font-weight: 500; }
.nav-links a { display: flex; align-items: center; gap: 5px; color: var(--text-dark); transition: color 0.3s; }
.nav-links a:hover { color: var(--secondary-blue); }

.nav-actions { display: flex; gap: 15px; }
.btn-publish {
    background-color: var(--accent-yellow);
    color: var(--text-dark);
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-login {
    background-color: var(--secondary-blue);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --- HERO SECTION --- */
.hero {
    position: relative;
    height: 450px;
    background: url('https://images.unsplash.com/photo-1526392060635-9d6019884377?q=80&w=2070&auto=format&fit=crop') center/cover no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 20px;
}
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.6));
    z-index: 1;
}
.hero-content { position: relative; z-index: 2; }

.hero h1 { font-size: 55px; line-height: 1.1; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); font-weight: 800; }
.hero h1 span { color: var(--accent-yellow); }
.hero p { font-size: 18px; margin-top: 10px; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }

/* Buscador */
.search-box {
    background: var(--white);
    border-radius: 50px;
    padding: 5px;
    display: flex;
    align-items: center;
    width: 80%;
    max-width: 800px;
    margin-top: 30px;
    position: relative;
    z-index: 2;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}
.search-input-group { display: flex; align-items: center; flex: 1; padding: 10px 20px; }
.search-input-group i { color: var(--primary-blue); font-size: 18px; margin-right: 10px; }
.search-input-group input {
    border: none; outline: none; width: 100%; font-size: 15px; color: var(--text-dark); font-family: inherit;
}
.search-divider { width: 1px; height: 30px; background-color: #ddd; }
.btn-search {
    background-color: var(--primary-blue); color: white;
    padding: 15px 30px; border-radius: 50px;
    font-weight: 600; font-size: 16px;
    display: flex; align-items: center; gap: 10px;
    transition: background 0.3s;
}
.btn-search:hover { background-color: var(--secondary-blue); }

/* --- SECCIÓN AGENCIAS --- */
.agencias-section {
    background: url('https://images.unsplash.com/photo-1534787238916-9ba6764efd4f?q=80&w=2031&auto=format&fit=crop') center/cover no-repeat;
    padding: 40px;
    position: relative;
}
.agencias-section::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255,255,255,0.8);
}

.agencias-content { position: relative; z-index: 2; max-width: 1400px; margin: 0 auto; }

.section-header {
    display: flex; justify-content: center; align-items: center; gap: 10px;
    font-size: 24px; font-weight: 700; color: var(--primary-blue); margin-bottom: 5px;
}
.section-header i { color: var(--secondary-blue); font-size: 28px; }

.highlight-yellow {
    background-color: var(--accent-yellow); text-align: center;
    padding: 5px 20px; border-radius: 20px;
    font-size: 13px; font-weight: 600; margin: 0 auto 30px auto;
    width: fit-content; color: var(--text-dark);
}

.agencies-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
}

/* Mapa simulado */
.map-area {
    position: relative;
    display: flex; flex-direction: column; align-items: center;
}
.map-area img { width: 100%; max-width: 250px; }
.map-list { text-align: left; font-size: 14px; font-weight: 500; margin-top: 10px;}
.map-list li { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; color: var(--text-dark);}
.map-list i { color: var(--secondary-blue); background: white; border-radius: 50%; padding: 2px; font-size: 12px;}

/* Grid de tarjetas */
.agencies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 15px;
}

.card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s;
}
.card:hover { transform: translateY(-5px); }

.card-img {
    height: 120px;
    background-size: cover;
    background-position: center;
    position: relative;
}
.card-badge {
    position: absolute; top: 10px; left: 10px;
    background-color: var(--accent-yellow); color: var(--text-dark);
    font-size: 10px; font-weight: 700; padding: 4px 8px; border-radius: 5px;
    display: flex; align-items: center; gap: 4px;
}
.card-badge i { font-size: 8px; }

.card-body { padding: 15px; text-align: center; flex: 1; display: flex; flex-direction: column;}
.card-logo { height: 40px; object-fit: contain; margin-bottom: 5px; }
.card-title { font-weight: 700; color: var(--primary-blue); font-size: 16px; }
.card-location { font-size: 12px; color: var(--text-light); margin-bottom: 10px; display: flex; align-items: center; justify-content: center; gap: 4px;}
.card-location i { color: var(--secondary-blue); }

.card-stats {
    display: flex; justify-content: center; align-items: center; gap: 15px;
    font-size: 12px; color: var(--text-light); margin-bottom: 15px;
}
.card-stats .stars { color: var(--accent-yellow); font-weight: 600; }
.card-stats .experiences { display: flex; align-items: center; gap: 4px; }

.btn-card {
    background-color: var(--primary-blue); color: white;
    padding: 8px 15px; border-radius: 20px;
    font-size: 13px; font-weight: 500;
    display: flex; align-items: center; justify-content: center; gap: 5px;
    margin-top: auto; width: 100%;
}

.link-ver-todas { text-align: right; font-size: 13px; color: var(--primary-blue); font-weight: 600; margin-bottom: 10px; display: block; }
.link-ver-todas:hover { text-decoration: underline; }

/* --- SECCIÓN CATEGORÍAS --- */
.categories-section {
    padding: 30px 40px;
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.cat-card {
    position: relative;
    height: 200px;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    color: white;
    background-size: cover;
    background-position: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.cat-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 10%, rgba(0,0,0,0.2) 60%);
    z-index: 1;
}
.cat-content { position: relative; z-index: 2; }
.cat-title { font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }
.cat-title i { font-size: 24px; }
.cat-desc { font-size: 13px; margin-bottom: 15px; color: #eee; }
.btn-cat {
    background-color: var(--accent-yellow); color: var(--text-dark);
    padding: 8px 15px; border-radius: 20px; font-weight: 600; font-size: 13px;
    display: inline-flex; align-items: center; gap: 5px;
}

/* --- BANNER CTA --- */
.cta-banner {
    background-color: var(--primary-blue);
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 5px solid var(--accent-yellow);
    color: white;
}
.cta-left { display: flex; align-items: center; gap: 20px; }
.cta-icon { font-size: 40px; }
.cta-text h2 { font-size: 24px; font-weight: 700; margin-bottom: 5px; }
.cta-text p { font-size: 14px; color: #ccc; }

.btn-cta {
    background-color: var(--accent-yellow); color: var(--text-dark);
    padding: 12px 25px; border-radius: 30px; font-weight: 700; font-size: 16px;
    display: flex; align-items: center; gap: 10px;
}

.cta-right { display: flex; align-items: center; gap: 30px; }
.cta-feature { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 12px; color: #eee;}
.cta-feature i { font-size: 24px; color: white;}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .agencies-layout { grid-template-columns: 1fr; }
    .map-area { display: none; }
    .navbar { flex-direction: column; gap: 15px; padding: 15px; }
    .nav-links { flex-wrap: wrap; justify-content: center; }
    .cta-banner { flex-direction: column; text-align: center; gap: 20px; }
    .cta-left { flex-direction: column; }
    .search-box { flex-direction: column; border-radius: 20px; padding: 15px; gap: 10px; }
    .search-input-group { width: 100%; border-bottom: 1px solid #eee; padding: 10px; }
    .search-divider { display: none; }
    .btn-search { width: 100%; justify-content: center; }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 35px; }
    .top-bar { font-size: 10px; padding: 5px 10px; }
    .top-bar-right span { display: none; }
    #watermark h1 { font-size: 3rem; }
}