/* ========================================= */
/* 1. RESET Y CONFIGURACIÓN GLOBAL           */
/* ========================================= */
:root {
    --bg-color: #ffffff; 
    --text-color: #000000;
    --font-main: 'Lato', sans-serif;
    --font-serif: 'Playfair Display', serif;
}

/* REGLA DE ORO: Evita que el padding agrande las cajas y cause scroll horizontal */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { 
    scroll-behavior: smooth; 
    overflow-x: hidden; /* Evita scroll lateral fantasma */
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    display: flex; flex-direction: column; min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

/* ========================================= */
/* 2. HEADER Y NAVEGACIÓN                    */
/* ========================================= */
header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 40px; background: #ffffff;
    border-bottom: 1px solid #f0f0f0; z-index: 1000;
    position: sticky; top: 0;
    width: 100%;
}
.logo { height: 50px; cursor: pointer; }

/* Navegación Escritorio */
.desktop-nav a {
    color: #000; text-decoration: none; margin-left: 20px;
    font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px;
    transition: font-weight 0.2s;
}
.desktop-nav a:hover { font-weight: bold; }

/* Botón Hamburguesa (Móvil) */
.hamburger-btn {
    display: none; /* Oculto en PC */
    background: none; border: none; cursor: pointer;
    padding: 10px; flex-direction: column; gap: 5px; z-index: 1001;
}
.hamburger-btn span {
    display: block; width: 25px; height: 2px; background-color: #000; transition: all 0.3s;
}

/* Overlay Menú Móvil */
.mobile-menu-overlay {
    height: 100%; width: 0; position: fixed; z-index: 5000;
    top: 0; right: 0; background-color: rgba(255, 255, 255, 0.98);
    overflow-x: hidden; transition: 0.5s;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
}
.mobile-links a {
    padding: 20px; text-decoration: none; font-size: 2rem;
    color: #000; display: block; transition: 0.3s;
    font-family: 'Playfair Display', serif; text-align: center;
}
.mobile-links a:hover { color: #666; }

/* Botón Cerrar (X) del Menú */
.closebtn {
    position: absolute; top: 20px; right: 30px;
    font-size: 2.5rem !important; color: #000000 !important;
    text-decoration: none; font-family: sans-serif !important;
    line-height: 1; cursor: pointer; transition: color 0.3s;
}
.closebtn:hover { color: #555 !important; }

/* ========================================= */
/* 3. SECCIÓN HERO (PORTADA INICIO)          */
/* ========================================= */
#hero {
    height: 90vh; width: 100%;
    /* Asegúrate de tener la imagen hero-bg.jpg */
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('hero-bg.jpg');
    background-size: cover; background-position: center; background-attachment: fixed;
    display: flex; align-items: center; color: #fff;
}
.hero-content { max-width: 1200px; margin: 0 auto; padding: 0 40px; }
#hero h1 {
    font-family: var(--font-serif); font-size: 3.5rem; line-height: 1.2;
    margin-bottom: 20px; font-weight: 400; text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
#hero p {
    font-size: 1.1rem; max-width: 500px; margin-bottom: 40px;
    line-height: 1.6; font-weight: 300; text-shadow: 0 1px 5px rgba(0,0,0,0.5);
}
.btn-hero {
    display: inline-block; padding: 15px 30px; background: #fff; color: #000;
    text-decoration: none; text-transform: uppercase; font-weight: bold;
    letter-spacing: 2px; font-size: 0.8rem; transition: background 0.3s;
}
.btn-hero:hover { background: #f0f0f0; }

/* ========================================= */
/* 4. SECCIÓN ABOUT (EN EL HOME)             */
/* ========================================= */
#about { padding: 100px 40px; background: #f9f9f9; }
.about-grid {
    max-width: 1200px; margin: 0 auto; display: grid;
    grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.about-img-container img {
    width: 100%; height: auto; display: block;
    filter: grayscale(100%); box-shadow: 20px 20px 0px rgba(0,0,0,0.05);
}
.about-text h2 {
    font-family: var(--font-serif); font-size: 3rem; margin-bottom: 10px;
    color: #333; font-weight: 400;
}
.about-text .subtitle { font-style: italic; color: #666; margin-bottom: 30px; }
.about-text p { line-height: 1.8; color: #555; margin-bottom: 20px; }
.btn-dark {
    background: #333; color: #fff; border: none; padding: 15px 30px;
    text-transform: uppercase; letter-spacing: 2px; cursor: pointer; margin-top: 20px;
    text-decoration: none; display: inline-block; text-align: center;
}
.btn-dark:hover { background: #000; }

/* ========================================= */
/* 5. SECCIÓN MAPA (CORREGIDO BORDES)        */
/* ========================================= */
#map-section { padding: 80px 0; background: #fff; text-align: center; }
.section-header { margin-bottom: 40px; padding: 0 20px; }
.section-header h2 { font-family: var(--font-serif); font-size: 3rem; margin-bottom: 10px; font-weight: 400; }
.section-header p { color: #777; font-weight: 300; }

#map-container {
    height: 70vh; width: 90%; margin: 0 auto; position: relative;
    /* CAMBIO: Fondo blanco para que no se vean bordes negros */
    background: #ffffff; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* CAMBIO: Fondo blanco también aquí */
#map { height: 100%; width: 100%; z-index: 1; background: #e8e8e8; }

/* CAMBIO: Fondo Leaflet blanco */
.leaflet-container { background: #e8e8e8 !important; }

/* Filtro para hacer el mapa BLANCO */
.leaflet-tile {
    /* Tu filtro actual para mar blanco */
    filter: grayscale(1) brightness(10) contrast(1.1); will-change: filter; 
}


#map-overlay-text {
    position: absolute; bottom: 20px; left: 40px;
    font-family: var(--font-serif); font-size: 3rem; color: #000;
    pointer-events: none; opacity: 0.8; z-index: 2; text-shadow: 0 0 20px white;
}

/* Botón Volver al Mundo */
#map-back-btn {
    position: absolute; bottom: 90px; left: 40px; z-index: 500;
    background: #000; color: #fff; border: none; padding: 10px 20px;
    font-family: var(--font-main); text-transform: uppercase; font-size: 0.75rem;
    letter-spacing: 2px; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
#map-back-btn:hover { background: #333; transform: translateY(-2px); }

/* Tooltips del Mapa (Blancos con sombra negra) */
.dark-tooltip {
    background: transparent; border: none; box-shadow: none;
    color: #ffffff !important; font-weight: bold; font-family: var(--font-main);
    text-transform: uppercase; font-size: 0.9rem; letter-spacing: 1px;
    text-shadow: 2px 2px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}
/* ========================================= */
/* PROTECCIÓN DE IMÁGENES (EVITAR DESCARGAS) */
/* ========================================= */
.photo-card img, .img-wrapper img {
    -webkit-touch-callout: none; 
    -webkit-user-select: none;   
    -khtml-user-select: none;    
    -moz-user-select: none;      
    -ms-user-select: none;       
    user-select: none;           
    -webkit-user-drag: none;     
    user-drag: none;
}

/* LA CAPA DE CRISTAL INVISIBLE PARA BLOQUEAR EL CLIC DERECHO */
.photo-card::before, .img-wrapper::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5; /* Se pone por encima de la foto pero debajo de la marca de agua */
    /* Al estar aquí, cualquier clic derecho cae en esta capa vacía y no en el <img> */
}
/* ========================================= */
/* 6. GALERÍA Y FOTOS                        */
/* ========================================= */
.hidden { display: none !important; }
#gallery-view { padding: 40px; animation: fadeIn 0.5s; background: #ffffff; }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

.gallery-header { display: flex; align-items: center; margin-bottom: 30px; }
.back-btn {
    background: none; border: 1px solid #000; color: #000;
    padding: 8px 15px; cursor: pointer; margin-right: 20px;
    text-transform: uppercase; font-size: 0.7rem;
}
.back-btn:hover { background: #000; color: #fff; }
#city-title { font-family: var(--font-serif); font-size: 2rem; font-weight: 400; margin: 0; }

.grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); 
    gap: 30px; 
    align-items: center; /* ESTO ES LA CLAVE: Evita que las tarjetas se estiren a lo alto */
}

/* Tarjetas y Marca de Agua */
.photo-card { 
    position: relative; 
    overflow: hidden; /* Esto corta de tajo cualquier cosa que se salga de la tarjeta */
    display: flex; /* Ayuda a que el contenedor abrace la foto exactamente */
    justify-content: center;
}
.photo-card img {
    width: 100%; 
    height: auto; 
    display: block;
    filter: grayscale(100%); transition: filter 0.5s, transform 0.3s;
    cursor: pointer; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.photo-card:hover img { filter: grayscale(0%); transform: scale(1.02); }

/* Estilo Compartido de Marca de Agua - LOGO TRANSPARENTE Y PROPORCIONAL */
/* Estilo Compartido de Marca de Agua - LOGO TRANSPARENTE Y PROPORCIONAL */
.photo-card::after, .img-wrapper::after {
    content: ""; 
    position: absolute; 
    top: 50%; 
    left: 50%;
    transform: translate(-50%, -50%); 
    
    background-image: url('logo.png');
    background-size: contain; 
    background-repeat: no-repeat;
    background-position: center;
    
    width: 45%; 
    height: 45%; 
    opacity: 0.35; 
    
    pointer-events: none; 
    z-index: 10;
}

/* ========================================= */
/* 7. MODAL (POPUP FOTO)                     */
/* ========================================= */
.modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255,255,255, 0.98); z-index: 2000;
    display: flex; justify-content: center; align-items: center;
}
.modal-content {
    display: flex; max-width: 90%; max-height: 90%;
    background: #fff; box-shadow: 0 0 40px rgba(0, 0, 0, 0.15);
}
.img-wrapper {
    position: relative; 
    display: inline-flex; /* Ajusta el contenedor al contenido exacto */
    justify-content: center; 
    align-items: center;
    background: #ffffff; 
    max-width: 65%; /* Mantiene el límite pero NO forzamos el 100% de ancho */
    overflow: hidden; /* Recorta la marca de agua si es más grande que la foto */
}
.img-wrapper img {
    display: block;
    max-width: 100%; 
    max-height: 85vh; 
    width: auto;  /* Respeta la proporción natural */
    height: auto; /* Respeta la proporción natural */
}
/* Marca de agua en el modal (vista ampliada) */
.img-wrapper::after { 
    width: 45%; 
    height: 45%; 
    opacity: 0.35; 
}

.modal-info { padding: 40px; max-width: 350px; display: flex; flex-direction: column; justify-content: center; }
.modal-info h3 { font-family: var(--font-serif); font-size: 2rem; margin-top: 0; }
.btn-purchase {
    margin-top: 30px; background: #000; color: #fff;
    padding: 15px; text-align: center; text-decoration: none;
    text-transform: uppercase; font-size: 0.75rem; letter-spacing: 2px; font-weight: bold;
}
/* Botón Cerrar (X) del Modal de Fotos */
.close-modal { 
    position: absolute; 
    top: 20px; 
    right: 20px; 
    font-size: 40px; 
    cursor: pointer; 
    color: #000; 
    z-index: 3000; 
}
/* --- ESTILO DESCRIPCIÓN FOTO (IGUAL A "SOBRE AUTORA") --- */
#modal-desc {
    font-family: 'Lato', sans-serif; 
    font-weight: 300;                
    font-size: 1rem;                 
    line-height: 1.3;                
    color: #555555;                  
    margin-top: 10px;
    margin-bottom: 30px;
    font-style: justify;
}

/* ========================================= */
/* 10. RESPONSIVE (CELULAR) - @MEDIA QUERY   */
/* ========================================= */
@media (max-width: 768px) {
    /* HEADER Y MENÚ MÓVIL */
    .desktop-nav { display: none !important; }
    .hamburger-btn { display: flex; }
    header { justify-content: space-between; padding: 15px 20px; }

    /* FIX IMAGEN DE FONDO (Zoom exagerado) */
    #hero {
        background-attachment: scroll !important;
        background-position: center center !important;
        background-size: cover !important;
        height: 100vh;
    }
    #hero h1 { font-size: 2.5rem; }

    /* LAYOUT GENERAL */
    .about-grid { grid-template-columns: 1fr; gap: 30px; }
    #map-container { width: 100%; height: 60vh; }
    
    /* MODAL EN MÓVIL (CORREGIDO PARA SCROLL Y EVITAR RECORTE) */
    .modal-content { 
        flex-direction: column; 
        overflow-y: auto; 
        justify-content: flex-start; 
        max-height: 95vh; 
        width: 95%; 
    }
    
    .img-wrapper { 
        max-width: 100%; 
        width: 100%; 
        max-height: none; 
        flex-shrink: 0; /* CLAVE: Obliga a flexbox a NO encoger la caja de la imagen */
    }
    
    .img-wrapper img {
        width: 100%; 
        height: auto; 
        max-height: none; 
        display: block;
    }
    
    .modal-info { 
        padding: 20px; 
        flex-shrink: 0; /* Evita que el texto también se comprima de forma rara */
    }
    
    /* Ajuste de tamaño de la marca de agua del logo para móvil */
    .img-wrapper::after { 
        width: 45%; 
        height: 45%; 
        z-index: 10; /* Asegura que siga por encima de la capa invisible */
    }
    
    
    /* ADMIN PANEL */
    #admin-panel { width: 100%; right: 0; border-radius: 0; }

    /* PÁGINA "SOBRE MÍ" */
    .minimal-layout { padding: 40px 20px; }
    
    .giant-title { 
        font-size: 13vw; 
        text-align: left; 
        word-break: break-word; 
    }
    
    .row-middle, .row-bottom { flex-direction: column; }
    .meta-column { margin-bottom: 20px; }
    .row-images { grid-template-columns: 1fr; }
    .big-links-column a { font-size: 2.5rem; }
    
    /* LISTA DE VIAJES VERTICAL */
    .travel-item { flex-direction: column; align-items: flex-start; }
    .travel-img-wrapper, .travel-text-wrapper { max-width: 100%; }
}
/* ========================================= */
/* 8. PANEL ADMIN (MINIMIZABLE)              */
/* ========================================= */
#admin-panel {
    position: fixed; bottom: 0; right: 20px; width: 320px;
    background: #ffffff; border-top-left-radius: 10px; border-top-right-radius: 10px;
    z-index: 3000; box-shadow: 0 -5px 25px rgba(0,0,0,0.15); border: 1px solid #e0e0e0;
    transition: all 0.3s ease; overflow: hidden; max-height: 90vh;
}
#admin-panel.minimized { height: 50px; }
#admin-panel.minimized #admin-body { display: none; }
.admin-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 15px; background: #f8f8f8; border-bottom: 1px solid #eee; height: 30px;
}
.admin-controls button { cursor: pointer; padding: 2px 8px; border-radius: 4px; font-weight: bold; margin-left: 5px; }
#admin-body { padding: 20px; }
#admin-panel input, #admin-panel textarea {
    width: 90%; background: #fff; border: 1px solid #ccc;
    padding: 8px; margin-bottom: 8px; color: #000; font-family: var(--font-main); border-radius: 4px;
}
.coords-row { display: flex; gap: 5px; }
.coords-row input { background: #f0f0f0 !important; color: #666 !important; }
.file-label {
    border: 1px dashed #999; padding: 10px; display: block; text-align: center; cursor: pointer; margin-top: 5px; border-radius: 4px; font-size: 0.8rem;
}
.action-btn { flex: 1; padding: 10px; background: #000; color: #fff; border: none; cursor: pointer; border-radius: 4px; font-weight: bold; }
.action-btn.cancel { background: #666; }

/* FOOTER */
footer {
    padding: 20px; text-align: center; font-size: 0.6rem;
    background: #fff; margin-top: auto; border-top: 1px solid #f0f0f0;
}
#admin-login-btn { color: #fff; cursor: default; transition: color 0.5s; }
footer:hover #admin-login-btn { cursor: pointer; color: #ccc; }

/* ========================================= */
/* 9. PÁGINA "SOBRE MÍ" (LAYOUT MINIMALISTA) */
/* ========================================= */
.minimal-layout {
    max-width: 1400px; margin: 0 auto; padding: 60px 40px;
    background-color: #fff; color: #000;
}
.meta-tag {
    font-family: 'Lato', monospace; font-size: 0.75rem;
    text-transform: uppercase; letter-spacing: 1px; color: #000;
}
.row-top {
    display: flex; justify-content: space-between; margin-bottom: 80px;
}
.giant-title {
    font-family: 'Lato', sans-serif; 
    font-size: 6rem; /* Por defecto en PC */
    line-height: 0.9;
    font-weight: 900; text-transform: uppercase; letter-spacing: -2px;
    margin: 0 0 100px 0; text-align: right;
}
.row-middle {
    display: flex; margin-bottom: 100px; align-items: flex-start;
}
.meta-column { flex: 1; padding-top: 5px; }
.text-column { flex: 2; max-width: 600px; }
.text-column p {
    font-size: 1rem; line-height: 1.6; margin-bottom: 20px; font-weight: 400;
}
.row-images {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; margin-bottom: 120px;
}
.min-img-box img {
    width: 100%; height: 300px; object-fit: cover;
    filter: grayscale(100%); margin-bottom: 10px; transition: filter 0.3s;
}
.min-img-box img:hover { filter: grayscale(0%); }
.img-cap {
    font-family: 'Lato', monospace; font-size: 0.65rem;
    text-transform: uppercase; display: block;
}
.row-bottom {
    display: flex; border-top: 1px solid #eee; padding-top: 40px;
}
.big-links-column { flex: 2; display: flex; flex-direction: column; }
.big-links-column a {
    font-family: 'Lato', sans-serif; font-size: 4rem; font-weight: 900;
    text-decoration: none; color: #000; line-height: 1; margin-bottom: 10px;
    text-transform: uppercase; letter-spacing: -1px; transition: color 0.3s;
}
.big-links-column a:hover { color: #666; }
.back-link-styled {
    display: inline-block; margin-top: 20px; font-family: 'Lato', sans-serif;
    font-size: 0.9rem; text-decoration: none; color: #000; border: 1px solid #000;
    padding: 10px 20px; text-transform: uppercase; font-weight: bold; transition: all 0.3s;
}
.back-link-styled:hover { background: #000; color: #fff; }

/* LISTA DE VIAJES (FOTO IZQUIERDA - TEXTO DERECHA) */
.travel-list {
    display: flex; flex-direction: column; gap: 60px; margin-bottom: 100px;
}
.travel-item {
    display: flex; align-items: center; gap: 40px;
}
.travel-img-wrapper { flex: 1; max-width: 50%; }
.travel-img-wrapper img {
    width: 100%; height: auto; display: block;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.1);
}
.travel-text-wrapper { flex: 1; max-width: 50%; }
.travel-location {
    font-family: 'Lato', monospace; font-size: 0.8rem; text-transform: uppercase;
    letter-spacing: 2px; color: #666; display: block; margin-bottom: 15px; font-weight: bold;
}
.travel-description {
    font-family: 'Lato', sans-serif; font-size: 1rem; line-height: 1.6; color: #333;
}

