/* === Reset Básico y Variables === */
:root {
    --primary-color: #007bff; /* Azul para énfasis */
    --text-color: #333;
    --bg-color: #f4f4f9; /* Fondo muy claro */
    --light-gray: #e9ecef;
    --dark-color: #1a1a1a;
    --font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff; /* Fondo principal blanco */
}

/* Contenedor centralizado */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === Header / Navegación - MODIFICADO === */
.header {
    background-color: var(--dark-color);
    color: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-list {
    list-style: none;
    display: flex;
    /* CENTRADO CLAVE: Asegura que todos los ítems estén alineados en el centro */
    align-items: center;
}

.nav-item {
    margin-left: 20px;
    position: relative;
    /* CENTRADO ADICIONAL: Asegura el centrado dentro de cada ítem */
    display: flex; 
    align-items: center;
}

.nav-link, .nav-item button {
    color: white;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 8px 10px;
    transition: color 0.3s;
    /* Asegura que el botón y el enlace de contacto tengan la misma altura base */
    line-height: 1.2; 
}

.nav-link:hover, .nav-item button:hover {
    color: var(--primary-color);
}

/* --- ESTILO DE LA FLECHA (CUSTOM ICON) --- */
.has-submenu button {
    /* Ocultar el texto de flecha (▼) que estaba en el HTML */
    padding-right: 25px; /* Espacio extra para el ícono */
    position: relative;
}

.has-submenu button::after {
    content: ''; /* Usaremos un truco de CSS para crear una flecha */
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid white; /* El triángulo es la flecha hacia abajo */
    transition: transform 0.3s ease;
}

/* Rotar la flecha cuando el submenú está activo */
.has-submenu button.active::after {
    transform: translateY(-50%) rotate(180deg);
    border-top: 5px solid var(--primary-color);
}


/* Submenú de Proyectos */
.submenu {
    position: absolute;
    top: 100%; /* Justo debajo del botón */
    /* Ajustar la alineación del submenú si deseas centrarlo o alinearlo a la derecha */
    /* left: 0; */
    right: 0; /* Lo alineamos a la derecha del botón */
    background-color: var(--dark-color);
    min-width: 180px;
    border: 1px solid #333;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
}

.submenu-item {
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    display: block;
}
/* ... el resto de los estilos ... */

.submenu-item:hover {
    background-color: #333;
    color: var(--primary-color);
}

/* Clase para mostrar el submenú con JS */
.submenu.active {
    display: flex;
}

/* === Secciones Generales === */
section {
    padding: 80px 0;
}

h1, h2, h3 {
    margin-bottom: 20px;
    color: var(--dark-color);
    font-weight: 600;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
}

/* === Sección Hero === */
.hero-section {
    background-color: var(--bg-color);
    text-align: center;
    padding: 150px 0;
}

.hero-section h1 {
    font-size: 3.5rem;
    margin-bottom: 10px;
}

.hero-section .subtitle {
    font-size: 1.3rem;
    color: #555;
    margin-bottom: 30px;
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: #0056b3;
}

/* === Contenedor de Proyectos === */
.projects-container {
    background-color: white;
}

.project-card {
    padding: 40px;
    margin-bottom: 40px;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Estilos de Contacto y Footer */
.contact-section {
    background-color: var(--bg-color);
    text-align: center;
}

.footer {
    background-color: var(--dark-color);
    color: var(--light-gray);
    padding: 20px 0;
    text-align: center;
    font-size: 0.9rem;
}


/* --------------------- ESTILOS ESPECIFICOS PARA PROYECYO 1 MAPA ------------------------- */

.project-card {
    width: 100%;
    max-width: 1200px;
    margin: 24px auto;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 22px rgba(8,15,30,0.06);
    border: 1px solid rgba(3,81,160,0.04);
}

/* Header */
.project-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}
.project-header h3 { margin: 0; font-size: 20px; color: #0b3d6b; }
.project-subtitle { margin: 0; font-size: 13px; color: #555; }
.project-tags { display:flex; gap:8px; margin-top:8px; flex-wrap:wrap; }
.project-tags span {
    background: #f1f6fb;
    color: #0351a0;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    border: 1px solid rgba(3,81,160,0.06);
}

/* ===========================
   LAYOUT PRINCIPAL: mapa + lista 
   =========================== */
.map-project-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* Contenedor del mapa (izquierda) */
.map-container-wrapper {
    flex: 1 1 auto;
    min-width: 260px;
    height: 480px; /* altura principal; adaptable */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.04);
    background: linear-gradient(180deg, #ffffff, #fbfdff);
}

/* Asegurarse que #map ocupe todo el wrapper */
#map-placeholder { width: 100%; height: 100%; display: block; }
#map { width: 100%; height: 100%; }

/* ===========================
   LISTA DE SUCURSALES (derecha)
   =========================== */
.branch-list-container {
    width: 380px; /* fijo en desktop */
    max-height: 480px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-right: 6px; /* para que no pegue con scrollbar */
}

/* Encabezado lista */
.branch-list-container h4 {
    margin: 0 0 6px 0;
    font-size: 16px;
    color: #0b3d6b;
}

/* Cada tarjeta de sucursal */
.branch-card {
    background: #fff;
    border-radius: 10px;
    padding: 14px;
    box-shadow: 0 6px 16px rgba(10,20,40,0.04);
    border-left: 4px solid transparent;
    transition: transform .15s ease, box-shadow .15s ease, border-left-color .15s;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Resaltar tarjeta al hover */
.branch-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 26px rgba(10,20,40,0.06);
}

/* Tarjeta activa (cuando cliqueas) */
.branch-card.active-branch {
    border-left-color: #0351a0;
    background: linear-gradient(180deg, #ffffff, #f7fbff);
    box-shadow: 0 12px 30px rgba(3,81,160,0.06);
}

/* Textos internos */
.branch-card h5 {
    margin: 0;
    font-size: 15px;
    color: #062a46;
}
.branch-address {
    margin: 0;
    font-size: 13px;
    color: #666;
}
.branch-info p {
    margin: 0;
    font-size: 13px;
    color: #444;
}

/* Contenedor de botones (alineados a la derecha si hay 2) */
.branch-card .branch-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: background .12s ease, transform .08s;
    text-decoration: none;
}

/* Botón principal "Mostrar en mapa" */
.branch-card .show-on-map {
    background: #0351a0;
    color: #fff;
    align-self: flex-start;
    border: 1px solid rgba(0,0,0,0.06);
}
.branch-card .show-on-map:hover { transform: translateY(-2px); }

/* Link que abre Maps - estilo secundario */
.branch-card .navigate-to {
    background: transparent;
    color: #0351a0;
    border: 1px solid rgba(3,81,160,0.12);
    align-self: flex-start;
    padding: 8px 10px;
    border-radius: 8px;
    text-decoration: none;
}
.branch-card .navigate-to:hover {
    background: rgba(3,81,160,0.06);
}

/* Si querés que los botones queden en la misma fila en pantallas grandes */
.branch-card .buttons-row {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

/* ===========================
   SCROLLBAR LIGERO (solo en desktop)
   =========================== */
.branch-list-container::-webkit-scrollbar { width: 10px; }
.branch-list-container::-webkit-scrollbar-thumb {
    background: rgba(3,81,160,0.12);
    border-radius: 8px;
}
.branch-list-container::-webkit-scrollbar-track { background: transparent; }



/* ------------------------ APARTADO ESPECIFICO PARA PDF GENERATOR -------------------*/

.pdf-generator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-top: 25px;
}

.pdf-generator-form {
    background: #ffffff;
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}

.pdf-generator-form label {
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}

.pdf-generator-form input,
.pdf-generator-form textarea {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 15px;
    margin-bottom: 12px;
}

.pdf-generator-form textarea {
    height: 130px;
    resize: none;
}

.pdf-generator-btn {
    width: 100%;
    padding: 15px;
    background: #007bff;
    border: none;
    color: white;
    font-size: 17px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
}

.pdf-generator-btn:hover {
    background: #005fcc;
}

.pdf-preview-box {
    background: #ffffff;
    padding: 20px;
    border-left: 5px solid #007bff;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}

.pdf-preview-title {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 10px;
}

.pdf-preview-content {
    white-space: pre-line;
}


/* --------------- APARTADO ESPECIFICO PARA "TO DO APP" -----------------------*/
/* ===== MINI TRELLO ===== */

.todo-container {
    margin-top: 50px;
    padding: 20px;
}

.todo-container h2 {
    text-align: center;
}

.todo-input {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.todo-input input {
    width: 300px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.todo-input button {
    margin-left: 10px;
    padding: 10px 15px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

.todo-input button:hover {
    background: #005fcc;
}

.todo-board {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.todo-column {
    background: #f7f7f7;
    padding: 15px;
    border-radius: 12px;
    width: 32%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.10);
}

.todo-column h3 {
    text-align: center;
    margin-bottom: 10px;
}

.todo-list {
    min-height: 200px;
    padding: 10px;
    border-radius: 8px;
    background: #ffffff;
}

.todo-item {
    padding: 10px;
    margin-bottom: 10px;
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: grab;
    transition: 0.2s;
}

.todo-item:active {
    cursor: grabbing;
}

.todo-item.dragging {
    opacity: 0.4;
}

/* ===== AJUSTES PARA QUE EL TO-DO QUEDE COMO PROJECT-CARD ===== */

.project-card .todo-container {
    margin-top: 20px;
    padding: 10px 0;
}

.project-card .todo-board {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.project-card .todo-column {
    background: #ffffff;
    border-radius: 12px;
    padding: 15px;
    width: 32%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.10);
}

.project-card .todo-input {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.project-card .todo-input input {
    width: 60%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.project-card .todo-input button {
    padding: 10px 15px;
    border-radius: 8px;
    background: #007bff;
    border: none;
    color: #fff;
    cursor: pointer;
    transition: .2s;
}

.project-card .todo-input button:hover {
    background: #005fcc;
}


/* -------------------- CATALOGO CON CARRITO ----------------------- */
/* HEADER DEL PROYECTO */
.project-header {
    margin-bottom: 25px;
}

.project-header h3 {
    font-size: 22px;
    color: #007bff;
    margin-bottom: 5px;
}

.project-subtitle {
    font-size: 15px;
    color: #444;
    margin-bottom: 10px;
}

.project-tags {
    display: flex;
    gap: 10px;
}

.project-tags span {
    background: #eef5ff;
    padding: 5px 10px;
    border-radius: 6px;
    color: #007bff;
    font-size: 13px;
    border: 1px solid #cbdfff;
}

/* --------- PRODUCTOS --------- */

.catalogo-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.producto-card {
    background: #ffffff;
    padding: 22px;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    text-align: center;
    transition: .25s;
}

.producto-card:hover {
    transform: translateY(-5px);
}

.producto-icon {
    margin-bottom: 12px;
    color: #007bff;
}



.producto-card h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.producto-card .precio {
    font-weight: bold;
    margin-bottom: 14px;
    font-size: 16px;
}

.btn-agregar {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    background: #007bff;
    border: none;
    color: white;
    cursor: pointer;
    transition: .25s;
}

.btn-agregar:hover {
    background: #005fcc;
}

/* --------- CARRITO --------- */

.carrito-box {
    margin-top: 40px;
    background: #ffffff;
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.carrito-box h3 {
    font-size: 20px;
    margin-bottom: 15px;
}

#carrito-lista {
    list-style: none;
    padding: 0;
    margin-bottom: 15px;
}

.carrito-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f7f7f7;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 10px;
}

.item-info {
    display: flex;
    flex-direction: column;
    font-size: 15px;
    font-weight: 500;
}

.item-controles {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-cant {
    width: 28px;
    height: 28px;
    border: none;
    background: #007bff;
    color: white;
    border-radius: 6px;
    cursor: pointer;
}

.btn-eliminar {
    background: #ff4444;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
}

.total {
    font-size: 18px;
    font-weight: bold;
}

.btn-limpiar {
    margin-top: 10px;
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    background: #ff4444;
    color: white;
    border: none;
    cursor: pointer;
}

.btn-limpiar:hover {
    background: #d93636;
}




/* ============== SISTEMA DE RESERVAS (WIZARD) ============== */

.reservation-container {
    display: grid;
    gap: 20px;
    margin-top: 10px;
}

/* pasos */
.wizard-steps {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.step-indicator {
    padding: 8px 12px;
    border-radius: 999px;
    background: #f2f6ff;
    color: #6b7a9a;
    font-weight: 600;
    font-size: 13px;
    border: 1px solid transparent;
    min-width: 90px;
    text-align: center;
}

.step-indicator.active {
    background: #007bff;
    color: #fff;
    box-shadow: 0 3px 10px rgba(0,123,255,0.12);
}

/* contenido */
.wizard-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

/* step layout */
.wizard-step {
    display: flex;
    gap: 20px;
}

/* left / right */
.step-left {
    flex: 1.1;
}

.step-right {
    flex: 0.9;
    background: #ffffff;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* calendar */
.mini-calendar {
    background: #ffffff;
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.06);
}

.cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.cal-btn {
    background: transparent;
    border: 1px solid transparent;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    color: #007bff;
}

.cal-month {
    font-weight: 700;
    color: #222;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.cal-day {
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    background: #f7f9ff;
    cursor: pointer;
    border: 1px solid transparent;
}

.cal-day.disabled {
    opacity: 0.35;
    cursor: default;
}

.cal-day.selected {
    background: #007bff;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0,123,255,0.12);
}

/* times grid */
.times-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.times-grid button {
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #dfefff;
    background: #ffffff;
    cursor: pointer;
}

.times-grid button.selected {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

.times-grid button.disabled {
    opacity: 0.35;
    cursor: default;
}

/* inputs y labels */
.wizard-step label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.wizard-step input[type="text"],
.wizard-step input[type="tel"],
.wizard-step input[type="email"],
.wizard-step input[type="date"] {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #dcdfe6;
    margin-bottom: 10px;
}

/* resumen */
.summary-box {
    background: #f7f9ff;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #e6f0ff;
}

/* controles */
.wizard-controls {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.btn-primary {
    background: #007bff;
    color: #fff;
    border: none;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
}

.btn-secondary {
    background: #ffffff;
    color: #007bff;
    border: 1px solid #dfefff;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
}

/* historial */
.reservation-footer {
    margin-top: 18px;
}

.reservas-list {
    list-style: none;
    padding: 0;
    margin-top: 8px;
}

.reservas-list li {
    background: #ffffff;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 8px;
    border-left: 4px solid #007bff;
}


/* CONTROLES */
.dashboard-controles {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.dashboard-controles label {
    font-weight: 500;
    font-size: 15px;
}

.dashboard-controles select {
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    background: #fff;
}

/* GRID DE TARJETAS */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 15px;
}

/* TARJETAS */
.dashboard-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0px 4px 14px rgba(0,0,0,0.08);
}

.dashboard-card h4 {
    margin-bottom: 15px;
    font-size: 18px;
    color: #0351a0; /* tu color principal */
}


/* responsive */
@media (max-width: 900px) {
    .wizard-step {
        flex-direction: column;
    }

    .step-right, .step-left {
        width: 100%;
    }
}


/* RESPONSIVE */

@media (max-width: 600px) {
    .carrito-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}





/* Responsive */

@media (max-width: 900px) {
    .pdf-generator-container {
        grid-template-columns: 1fr;
    }
}



/* ===========================
   RESPONSIVE (movil)
   =========================== */
@media (max-width: 920px) {
    .map-project-layout {
        flex-direction: column;
    }

    .map-container-wrapper, .branch-list-container {
        width: 100%;
    }

    .map-container-wrapper { height: 360px; }
    .branch-list-container { max-height: none; margin-top: 16px; }
}

/* Ajustes finos para pantallas muy pequeñas */
@media (max-width: 480px) {
    .project-card { padding: 14px; }
    .branch-card { padding: 12px; }
    .branch-list-container { width: 100%; }
}



/* Media Query Básico para Responsive */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        text-align: center;
    }

    .nav-list {
        margin-top: 10px;
    }

    .nav-item {
        margin: 0 10px;
    }
    
    .hero-section {
        padding: 100px 0;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
}