/* ===== ESTILOS GENERALES ===== */
:root {
    /* Palette: Modern Emerald & Dark Theme */
    --primary: #10B981;
    /* Emerald 500 */
    --primary-hover: #059669;
    /* Emerald 600 */
    --bg-body: #111827;
    /* Gray 900 */
    --bg-card: #1F2937;
    /* Gray 800 */
    --bg-card-hover: #374151;
    /* Gray 700 */
    --text-main: #F9FAFB;
    /* Gray 50 */
    --text-muted: #9CA3AF;
    /* Gray 400 */
    --glass-bg: rgba(31, 41, 55, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-md: 0.75rem;
    /* 12px */
    --radius-lg: 1rem;
    /* 16px */
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ===== HERO DASHBOARD ===== */
.main-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px 20px;
    /* Removed top padding, layout handled by hero */
}

.hero-wrapper {
    background: radial-gradient(circle at top center, rgba(16, 185, 129, 0.15) 0%, rgba(17, 24, 39, 1) 80%);
    margin: 0 -20px 40px;
    /* Full width breakout */
    padding: 40px 20px 60px;
    /* Bottom padding creates overlap space */
    position: relative;
    text-align: center;
    border-bottom: 1px solid var(--glass-border);
}

.hero-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, transparent, var(--bg-body));
    pointer-events: none;
}

.dashboard-header {
    margin-bottom: 60px;
    /* Increased spacing */
}

.brand-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    color: var(--primary);
    font-size: clamp(2.2rem, 6vw, 3.5rem);
    /* Significantly larger */
    /* Responsive size */
    letter-spacing: -0.01em;
    text-shadow: 0 0 40px rgba(16, 185, 129, 0.3);
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    padding: 0 4px;
    /* Prevent edge clipping */
    overflow-x: visible;
}

.city-selector-badge {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 8px 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.city-selector-badge:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.15);
}

.brand-badge {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    letter-spacing: 0.05em;
    text-transform: none;
}

.city-chevron {
    color: var(--primary);
    font-size: 0.9rem;
    animation: chevronBounce 2s infinite;
}

.city-selector-badge:hover .brand-badge {
    color: #fff;
}

@keyframes chevronBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(3px);
    }
}

/* CARD FLOTANTE PRINCIPAL */
.hero-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    padding: 16px 20px;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 20;
    /* Above the gradient fade */
    backdrop-filter: blur(20px);
    transform: translateY(0);
    animation: heroCardUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes heroCardUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 24px 0 16px;
    flex-wrap: wrap;
}

/* Utility for secondary outline button in hero */
.btn-outline {
    background: transparent !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-muted) !important;
}

.btn-outline:hover {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    background: rgba(16, 185, 129, 0.05) !important;
}



section {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
    padding: 24px;
    border: 1px solid var(--glass-border);
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

/* Staggered animation delays */
#calendar-container {
    animation-delay: 0.1s;
}

#map-section {
    animation-delay: 0.2s;
}

#weather {
    animation-delay: 0.3s;
}

#tides {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#calendar-container {
    margin-top: 0;
}

/* ===== ESTILOS SECCIÓN FARMACIA DE TURNO ===== */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 16px;
}

.calendar-header button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-main);
    width: 36px;
    height: 36px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-header button:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

#month-year {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

.week-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    padding: 0 0 12px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.day-cell {
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    color: var(--text-muted);
}

.day-cell:hover {
    background-color: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.today {
    border: 2px solid var(--primary);
    font-weight: 700;
    color: var(--primary);
    background-color: rgba(16, 185, 129, 0.1);
}

.day-cell.selected {
    background-color: var(--primary);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    transform: scale(1.05);
}

.day-cell.other-month {
    opacity: 0.3;
    pointer-events: none;
}

.info-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.pharmacy-info-wrapper {
    position: relative;
    margin-bottom: 20px;
    text-align: center;
}

.pharmacy-info-container {
    position: relative;
    padding: 0;
    background-color: transparent;
    z-index: 2;
}

.info-title {
    color: var(--text-main);
    font-size: 1.25rem;
    margin: 0;
    font-weight: 600;
    letter-spacing: -0.01em;
}

#pharmacy-cards-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.pharmacy-card {
    background-color: var(--bg-card-hover);
    padding: 20px;
    border-radius: var(--radius-md);
    text-align: left;
    flex: 1 1 calc(33.333% - 16px);
    max-width: 320px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pharmacy-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.pharmacy-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    opacity: 0.7;
}

.pharmacy-card h4 {
    color: var(--primary);
    margin: 0 0 12px 0;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
}

.pharmacy-card p {
    margin: 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.pharmacy-card .fa-solid.fa-location-dot {
    margin-right: 10px;
    color: var(--primary);
    width: 20px;
    text-align: center;
    animation: locationBounce 2s ease-in-out infinite;
}

@keyframes locationBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

.pharmacy-card {
    cursor: pointer;
}

.pharmacy-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.pharmacy-card:hover .pharmacy-address-text {
    color: var(--primary);
    transition: color 0.2s;
}

/* Reusing animation for the specific elements if still needed, but general card hover covers it now */


.pharmacy-card a:hover .fa-location-dot {
    animation: locationPulse 0.5s ease-in-out;
}

@keyframes locationPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

/* ===== ESTILOS SECCIÓN MAPA ===== */
#map-section h2 {
    font-size: 1.75rem;
    color: var(--primary);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--glass-border);
    font-family: 'Montserrat', sans-serif;
}

#map {
    width: 100%;
    height: 450px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--glass-border);
}

.map-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: nowrap;
}

.map-style-buttons {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.map-style-button,
.map-location-button {
    background-color: var(--bg-card-hover);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    box-sizing: border-box;
    white-space: nowrap;
    transition: all 0.2s;
}

.map-style-button:hover,
.map-location-button:hover {
    background-color: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.map-style-button.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.map-location-button.enabled {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

.map-location-note {
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

@media (max-width: 600px) {
    .map-controls-row {
        gap: 4px;
    }

    .map-style-buttons {
        gap: 4px;
    }

    .map-style-button,
    .map-location-button {
        font-size: 0.78rem;
        padding: 6px 8px;
        height: 34px;
    }
}

/* ===== ESTILOS SECCIÓN CLIMA ===== */
/* ===== ESTILOS SECCIÓN CLIMA ===== */
#weather h2,
#tides h2 {
    font-size: 1.75rem;
    color: var(--primary);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--glass-border);
    font-family: 'Montserrat', sans-serif;
}

.section-title {
    text-align: center;
}

.weather-container,
.tides-container {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
}

.weather-card {
    background-color: var(--bg-card-hover);
    padding: 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    flex: 1 1 240px;
    max-width: 450px;
    box-sizing: border-box;
    text-align: center;
    border: 1px solid var(--glass-border);
    transition: transform 0.2s;
}

.tide-card {
    background: #374151;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    flex: 1 1 auto;
    max-width: 800px;
    box-sizing: border-box;
    text-align: center;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.weather-card:hover,
.tide-card:hover {
    transform: translateY(-4px);
}

.weather-today {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
}

.weather-icon {
    font-size: 3rem;
    color: var(--primary);
}

.weather-temp {
    font-size: 3.5rem;
    font-weight: 800;
    font-family: 'Montserrat', sans-serif;
    color: var(--text-main);
}

.weather-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}


.weather-details,
.tide-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.weather-detail {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--text-muted);
}

.tide-item {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #f9fafb;
}

.weather-detail i,
.tide-item i {
    color: var(--primary);
    margin-right: 12px;
    width: 24px;
    text-align: center;
}

#weatherChart {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 16px;
    border-radius: var(--radius-md);
    margin-top: 16px;
}

/* ===== ESTILOS SECCIÓN MAREAS ===== */
.tide-location {
    color: var(--primary);
    font-size: 1.25rem;
    margin-bottom: 16px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
}

/* ===== BOTONES DE ACCESO DIRECTO Y CALENDARIO ===== */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 24px 0;
}

.action-button {
    background-color: var(--primary);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* Subtle border for definition */
    padding: 12px 24px;
    border-radius: 12px;
    /* Less rounded (was pill) */
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    /* Enhanced shadow */
}

.action-button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(16, 185, 129, 0.4);
    /* Glow effect on hover */
    border-color: rgba(255, 255, 255, 0.2);
}

/* Botón para expandir/colapsar calendario */
/* Botón para expandir/colapsar calendario */
/* Botón para expandir/colapsar calendario */
/* Grupo de acciones del Hero para distribución perfecta */
.hero-actions-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
}

.calendar-toggle-btn {
    background-color: rgba(255, 255, 255, 0.05);
    /* Muted glass bg */
    color: var(--text-muted);
    /* Muted text */
    border: 1px solid var(--glass-border);
    /* Subtle border */
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    box-shadow: none;
    /* Removed shadow for muted look */
    width: 100%;
    justify-content: center;
    transition: all 0.2s;
}

.calendar-toggle-btn:hover {
    background-color: var(--bg-card-hover);
    color: var(--text-main);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.calendar-toggle-btn i {
    font-size: 0.9rem;
}

/* Botón compartir WhatsApp sutil (Solo icono) */
.pharmacy-share-btn {
    width: 34px;
    height: 34px;
    margin: 0;
    padding: 0;
    background: transparent;
    color: rgba(37, 211, 102, 0.7);
    border: 1px solid rgba(37, 211, 102, 0.2);
    border-radius: 50%;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.brand-stars {
    color: var(--primary);
    text-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
    margin-left: 8px;
    letter-spacing: 2px;
    display: inline-flex;
}

.pharmacy-share-btn:hover {
    color: #25d366;
    background: rgba(37, 211, 102, 0.05);
    border-color: rgba(37, 211, 102, 0.5);
    transform: scale(1.1);
}

.pharmacy-share-btn i {
    font-size: 1.2rem;
}

/* Resalte sutil para el botón de donación en el Hero */
.hero-donate-btn {
    border-color: rgba(16, 185, 129, 0.4);
    background-color: rgba(16, 185, 129, 0.05);
    color: var(--primary);
}

.hero-donate-btn:hover {
    border-color: var(--primary);
    background-color: rgba(16, 185, 129, 0.1);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

.calendar-expandable {
    margin-top: 15px;
}

/* ===== ESTILOS WEATHERWIDGET ===== */
.weatherwidget-io {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ===== ESTILOS FOOTER ===== */
/* ===== ESTILOS FOOTER ===== */
footer {
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
    margin-top: 0;
    padding: 0 20px 40px;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    background-color: transparent;
    padding: 10px 0 0;
    border-radius: 0;
    box-shadow: none;
    max-width: none;
    box-sizing: border-box;
    text-align: center;
    margin: 0 auto;
}

.whatsapp-contact {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.2s;
    font-weight: 500;
}

.whatsapp-contact:hover {
    color: var(--primary);
}

.whatsapp-icon {
    color: #25D366;
    font-size: 1.5rem;
}

.copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.copyright a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.copyright a:hover {
    text-decoration: underline;
}

/* ===== MEDIA QUERIES ===== */
@media (max-width: 768px) {
    .main-container {
        padding: 10px;
    }

    header h1 {
        font-size: 2.2rem;
    }

    #month-year {
        text-align: center;
        font-size: 1.6rem;
    }

    .title-main,
    .title-sub {
        font-size: 2.2rem;
    }

    section {
        padding: 10px;
    }

    #pharmacy-cards-container {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .pharmacy-card {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 15px;
    }

    .weather-container,
    .tides-container {
        flex-direction: column;
        gap: 15px;
    }

    .weather-card {
        padding: 15px;
        min-height: auto;
    }

    .tide-card {
        padding: 12px 15px 6px;
        min-height: auto;
    }

    .weather-today {
        flex-direction: column;
        gap: 5px;
        margin-bottom: 10px;
    }

    .weather-icon {
        font-size: 2.5rem;
    }

    .weather-temp {
        font-size: 3rem;
    }

    .weather-details,
    .tide-details {
        gap: 5px;
    }

    .weather-desc,
    .weather-detail span,
    .tide-item span {
        font-size: 1rem;
    }

    .pharmacy-card h4,
    .weather-card h3,
    .tide-card h3 {
        font-size: 1.3rem;
    }

    .pharmacy-card p {
        font-size: 1rem;
        justify-content: center;
        flex-direction: row;
    }

    .pharmacy-card .fa-solid {
        margin-right: 5px;
    }

    .calculator-container {
        padding: 15px;
    }

    .tide-item:last-child {
        margin-bottom: 0;
    }
}

.map-info-window {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-card);
    padding: 16px;
    border-radius: var(--radius-md);
    color: var(--text-main);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--glass-border);
    text-align: center;
    box-sizing: border-box;
    margin: 0 0 16px 0;
    width: 100%;
    backdrop-filter: blur(12px);
}

.map-info-window h3 {
    margin: 0 0 8px 0;
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
}

.map-info-window p {
    margin: 0 0 8px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.duty-badge {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--bg-body);
    border: 1px solid var(--primary);
    padding: 4px 10px;
    border-radius: 6px;
    margin-left: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    animation: dutyBadgePulse 2s infinite alternate ease-in-out;
}

@keyframes dutyBadgePulse {
    from {
        border-color: #10B981;
        /* Base Emerald */
        color: #10B981;
        box-shadow: 0 0 2px rgba(16, 185, 129, 0.1);
    }

    to {
        border-color: #6EE7B7;
        /* Lighter Green */
        color: #6EE7B7;
        box-shadow: 0 0 8px rgba(110, 231, 183, 0.3);
    }
}

.map-info-window--compact {
    padding: 8px 10px;
}

.directions-link {
    display: block;
    width: 100%;
    text-align: center;
    background-color: var(--bg-body);
    /* Page background as requested */
    color: #9ca3af;
    border: 1px solid var(--glass-border);
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
    box-sizing: border-box;
    max-width: 100%;
}

.directions-link:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* Animación sutil para iconos de farmacias de turno */
.pharmacy-leaflet-icon-duty div {
    box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.7);
    animation: dutyPulseStrong 1.5s infinite;
    background-color: #FF6B35 !important;
    /* Naranja vibrante para farmacias de turno */
    border-color: #fff !important;
    transform-origin: center;
}

@keyframes dutyPulseStrong {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.7);
    }

    70% {
        transform: scale(1.15);
        box-shadow: 0 0 0 15px rgba(255, 107, 53, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 107, 53, 0);
    }
}



/* Estado de icono seleccionado: un poco más grande que el resto */
/* Estilo base para todos los iconos (reemplaza estilos inline del JS) */
.pharmacy-leaflet-icon div,
.pharmacy-leaflet-icon-duty div {
    background-color: #10b981 !important;
    border: 2px solid white !important;
    color: white !important;
    display: flex;
    width: 100%;
    height: 100%;
    /* Asegurar centro */
    align-items: center;
    justify-content: center;
    box-shadow: none;
    transition: all 0.3s ease;
    border-radius: 50% !important;
    /* Force circle */
}

/* El icono de turno mantiene la animación definida anteriormente */
.pharmacy-leaflet-icon-duty div {
    animation: dutyPulseStrong 1.5s infinite;
    z-index: 1000;
}

.pharmacy-leaflet-icon-selected div {
    background-color: var(--primary) !important;
    transform: scale(1.3);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.4) !important;
    /* Ring effect */
    z-index: 1001;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== COFFEE MODAL ===== */
.coffee-modal {
    position: fixed;
    inset: 0;
    /* Asegura cobertura total */
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.4s ease;
    padding: 20px;
    margin: 0;
    /* Evita desplazamientos por parientes */
}

.coffee-modal.active {
    opacity: 1;
}

.coffee-modal-content {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem 1.5rem;
    max-width: 360px;
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    text-align: center;
    animation: modalIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: opacity 0.25s ease;
}

.coffee-modal-icon {
    font-size: 4rem;
    margin-bottom: 1.2rem;
    display: block;
    line-height: 1;
}

/* Remoción de animaciones antiguas */
@keyframes celebrate {

    0%,
    100% {
        transform: none;
    }
}

.coffee-modal-title {
    margin: 0 0 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
    max-width: 100%;
}

.coffee-modal-text {
    margin: 0 0 1rem;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.4;
    max-width: 90%;
}

.coffee-supporters {
    background: transparent;
    padding: 0;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    width: 100%;
}

.coffee-supporters-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    opacity: 0.8;
}

.coffee-supporters-text strong {
    color: var(--primary);
    font-weight: 800;
}

.coffee-modal-buttons,
.payment-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.monto-input {
    width: 100%;
    box-sizing: border-box;
    padding: 1.1rem;
    border: 1.5px solid var(--glass-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
    transition: all 0.3s;
    margin-bottom: 8px;
}

.monto-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(16, 185, 129, 0.1);
}

.monto-input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

/* Modal Close Button (X) */
.coffee-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    transition: color 0.2s;
    z-index: 10;
}

.coffee-modal-close:hover {
    color: var(--text-main);
}

.coffee-modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.coffee-btn {
    width: 100%;
    padding: 14px 20px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    /* Altura fija para ambos */
}

.coffee-btn-icon {
    font-size: 1.4rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* BOTON SOFISTICADO: Estilo "Emerald Glass Glow" */
.coffee-btn-primary {
    background: #065F46;
    /* Base esmeralda profunda */
    color: #ECFDF5;
    border: 1.5px solid rgba(16, 185, 129, 0.4);
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    animation: buttonGlow 3s infinite ease-in-out;
}

/* Efecto Shimmer (Brillo que recorre el botón) */
.coffee-btn-primary::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right,
            transparent,
            rgba(255, 255, 255, 0.15),
            transparent);
    transform: skewX(-25deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    50%,
    100% {
        left: 150%;
    }
}

/* Animación de Pulso Sutil de Sombra (Glow) */
@keyframes buttonGlow {

    0%,
    100% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 0 rgba(16, 185, 129, 0);
    }

    50% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(16, 185, 129, 0.4);
    }
}

.coffee-btn-primary:hover {
    background: #047857;
    transform: translateY(-2px);
    border-color: rgba(16, 185, 129, 0.8);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 20px rgba(16, 185, 129, 0.5);
}

.coffee-btn-primary:active {
    transform: translateY(0);
}

.coffee-btn-secondary {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    font-weight: 500;
}

.coffee-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .coffee-modal {
        padding: 1rem;
    }

    .coffee-modal-content {
        padding: 2.2rem 1rem;
        max-width: 320px;
        /* Un poco más de espacio para ayudar a la linea única */
    }

    .coffee-modal-icon {
        font-size: 3.2rem;
    }

    .coffee-modal-title {
        font-size: 1.25rem;
        white-space: nowrap;
        /* Fuerza una sola linea */
    }

    .coffee-modal-text {
        font-size: 0.88rem;
        white-space: nowrap;
        /* Fuerza una sola linea */
        max-width: 100%;
    }

    .coffee-supporters-text {
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .coffee-btn {
        padding: 1rem;
        font-size: 1rem;
    }
}

/* ===== PAYMENT SELECTION STYLES ===== */
.payment-options {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
    margin-top: 0.5rem;
}

.alias-btn-wrapper {
    position: relative;
    width: 100%;
}

/* BOTON SOFISTICADO ALIAS: Estilo "Indigo Glass Glow" */
.coffee-btn-alias {
    background: #312E81;
    /* Base indigo profunda */
    color: #EEF2FF;
    border: 1.5px solid rgba(99, 102, 241, 0.4);
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    animation: aliasGlow 3s infinite ease-in-out;
}

/* Shimmer para el botón de alias */
.coffee-btn-alias::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right,
            transparent,
            rgba(255, 255, 255, 0.15),
            transparent);
    transform: skewX(-25deg);
    animation: shimmer 3s infinite;
}

@keyframes aliasGlow {

    0%,
    100% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 0 rgba(99, 102, 241, 0);
    }

    50% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(99, 102, 241, 0.4);
    }
}

.coffee-btn-alias:hover {
    background: #3730A3;
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.8);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 20px rgba(99, 102, 241, 0.5);
}

.copy-status {
    font-size: 0.8rem;
    color: var(--primary);
    margin-top: 0.4rem !important;
    font-weight: 600;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    text-align: center;
}

.copy-status.visible {
    opacity: 1;
    transform: translateY(0);
}



.footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1rem;
}

/* ===== PUNTADATA FOOTER LOGO ===== */
.footer-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    gap: 6px;
    vertical-align: middle;
    margin-left: 4px;
    transition: transform 0.2s ease;
}

.footer-logo-link:hover {
    transform: scale(1.05);
}

.logo-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    color: #FFFFFF;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    line-height: 1;
}

.logo-rect {
    display: inline-block;
    width: 12px;
    height: 18px;
    background-color: #8B5CF6;
    /* Violeta/Púrpura del logo */
    animation: logoBlink 1.2s infinite ease-in-out;
}

@keyframes logoBlink {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 5px rgba(139, 92, 246, 0.5);
    }

    50% {
        opacity: 0.2;
        box-shadow: 0 0 0px rgba(139, 92, 246, 0);
    }
}