/**
 * Alfa Medical Colombia - Frontend Styles
 * Modern, Minimalist & Clinical Clean Design
 */

:root {
    --am-primary: #005696;
    --am-primary-dark: #003366;
    --am-primary-light: #0088cc;
    --am-accent-cyan: #00c0f3;
    --am-sector-clinico: #28a745;
    --am-sector-hosp: #0298a6;
    --am-sector-odonto: #007bff;
    --am-sector-catalogo: #0c2340;
    --am-bg-light: #f4f8fb;
    --am-text-main: #1f2937;
    --am-text-muted: #4b5563;
    --am-border-color: #e5e7eb;
    --am-shadow-sm: 0 2px 8px rgba(0, 51, 102, 0.08);
    --am-shadow-md: 0 8px 24px rgba(0, 51, 102, 0.12);
    --am-shadow-lg: 0 14px 36px rgba(0, 51, 102, 0.18);
    --am-radius: 12px;
}

/* ==========================================================================
   1. HERO SECTION (LÍNEA DE BIOSEGURIDAD)
   ========================================================================== */
.alfamedical-hero-section {
    position: relative;
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
    background-color: #003366;
    color: #ffffff;
    min-height: 520px;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 40px 20px;
    box-shadow: 0 10px 30px rgba(0, 30, 60, 0.3);
}

.alfamedical-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(0, 30, 60, 0.75) 0%, rgba(0, 75, 135, 0.45) 50%, rgba(0, 140, 210, 0.2) 100%);
    pointer-events: none;
}

.alfamedical-hero-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 40px;
}

.alfamedical-hero-left {
    flex: 0 0 38%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.alfamedical-hero-person {
    max-width: 100%;
    height: auto;
    max-height: 480px;
    filter: drop-shadow(0 15px 25px rgba(0,0,0,0.4));
    object-fit: contain;
    transform: translateY(10px);
}

.alfamedical-hero-right {
    flex: 1;
}

.alfamedical-hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin: 0 0 15px 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    line-height: 1.15;
}

.alfamedical-hero-subtitle {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #e2f1fc;
    margin-bottom: 25px;
    max-width: 650px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.alfamedical-hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 420px;
}

.am-pill-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 26px;
    border-radius: 50px;
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid rgba(255,255,255,0.25);
    text-align: center;
}

.am-pill-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.btn-clinico { background-color: var(--am-sector-clinico); }
.btn-hospitalario { background-color: var(--am-sector-hosp); }
.btn-odontologico { background-color: var(--am-sector-odonto); }
.btn-catalogo { background-color: var(--am-sector-catalogo); }

/* ==========================================================================
   2. ENCABEZADOS DE SECCIÓN
   ========================================================================== */
.alfamedical-section-header {
    text-align: center;
    margin-bottom: 35px;
}

.sub-badge {
    display: inline-block;
    background: rgba(0, 86, 150, 0.1);
    color: var(--am-primary);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    letter-spacing: 1px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.section-title {
    font-size: 2.2rem;
    color: var(--am-primary-dark);
    font-weight: 700;
    margin: 5px 0 10px 0;
}

.section-desc {
    color: var(--am-text-muted);
    font-size: 1.05rem;
    max-width: 680px;
    margin: 0 auto;
}

/* ==========================================================================
   3. TARJETA DE PRODUCTO (CARDS)
   ========================================================================== */
.alfamedical-card {
    background: #ffffff;
    border-radius: var(--am-radius);
    overflow: hidden;
    box-shadow: var(--am-shadow-sm);
    border: 1px solid var(--am-border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.3s ease;
}

.alfamedical-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--am-shadow-lg);
    border-color: #bce2fc;
}

.card-image-wrap {
    position: relative;
    width: 100%;
    height: 220px;
    background-color: #f8fafc;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.card-image-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.alfamedical-card:hover .card-image-wrap img {
    transform: scale(1.06);
}

.sector-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--am-primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    z-index: 2;
}

.card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--am-primary-dark);
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.card-title a {
    color: inherit;
    text-decoration: none;
}

.card-title a:hover {
    color: var(--am-accent-cyan);
}

.card-presentacion {
    font-size: 0.85rem;
    color: #4b5563;
    background: #f0f4f8;
    padding: 4px 8px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.card-excerpt {
    color: var(--am-text-muted);
    font-size: 0.92rem;
    line-height: 1.5;
    margin-bottom: 15px;
    flex: 1;
}

.card-badges-docs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 15px;
}

.doc-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    text-transform: uppercase;
}
.doc-badge.invima { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.doc-badge.ficha { background: #e1f5fe; color: #0277bd; border: 1px solid #b3e5fc; }
.doc-badge.vendedor { background: #ede7f6; color: #4527a0; border: 1px solid #d1c4e9; }

.am-card-btn {
    display: block;
    text-align: center;
    background: linear-gradient(135deg, var(--am-primary) 0%, var(--am-primary-light) 100%);
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.am-card-btn:hover {
    background: linear-gradient(135deg, var(--am-primary-dark) 0%, var(--am-primary) 100%);
    box-shadow: 0 4px 12px rgba(0, 86, 150, 0.3);
}

/* ==========================================================================
   4. CARRUSEL DINÁMICO DE 3 PRODUCTOS
   ========================================================================== */
.alfamedical-carousel-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.alfamedical-carousel-container {
    position: relative;
    overflow: hidden;
    padding: 10px 0;
}

.alfamedical-carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 20px;
}

.alfamedical-carousel-slide {
    flex: 0 0 calc((100% - 40px) / 3); /* 3 productos exactos en desktop */
    box-sizing: border-box;
}

.am-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #ffffff;
    border: 1px solid #ddd;
    color: var(--am-primary);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10;
    transition: all 0.2s;
}

.am-carousel-nav:hover {
    background: var(--am-primary);
    color: #ffffff;
}

.am-carousel-nav.prev { left: 5px; }
.am-carousel-nav.next { right: 5px; }

.am-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.am-carousel-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #cbd5e1;
    cursor: pointer;
    transition: background 0.3s;
}

.am-carousel-dots .dot.active {
    background: var(--am-primary);
    width: 24px;
    border-radius: 10px;
}

/* ==========================================================================
   5. CATÁLOGO Y FILTROS POR SECTOR
   ========================================================================== */
.alfamedical-catalogo-section {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
}

.alfamedical-filter-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.am-filter-btn {
    background: #ffffff;
    color: var(--am-primary);
    border: 1.5px solid var(--am-primary);
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.am-filter-btn:hover,
.am-filter-btn.active {
    background: var(--am-primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 86, 150, 0.25);
}

.alfamedical-product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.alfamedical-product-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.alfamedical-product-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

.alfamedical-grid-item {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ==========================================================================
   6. BOTONES DE DESCARGA OFICIALES (INVIMA, FICHA, VENDEDORES)
   ========================================================================== */
.alfamedical-downloads-box {
    background: #f8fbff;
    border: 2px dashed #bce2fc;
    border-radius: var(--am-radius);
    padding: 24px;
    margin: 30px 0;
}

.downloads-heading {
    font-size: 1.25rem;
    color: var(--am-primary-dark);
    margin: 0 0 6px 0;
    font-weight: 700;
}

.downloads-sub {
    color: var(--am-text-muted);
    font-size: 0.95rem;
    margin-bottom: 18px;
}

.alfamedical-buttons-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.am-doc-btn {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    border-radius: 10px;
    text-decoration: none !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: all 0.25s ease;
}

.am-doc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.18);
}

.am-doc-btn .btn-icon {
    font-size: 1.8rem;
    margin-right: 15px;
}

.am-doc-btn .btn-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.am-doc-btn .btn-text strong {
    font-size: 1.05rem;
}

.am-doc-btn .btn-text small {
    font-size: 0.82rem;
    opacity: 0.9;
}

.am-doc-btn .btn-download-icon {
    font-size: 1.3rem;
    background: rgba(255,255,255,0.25);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-invima { background: linear-gradient(135deg, #1b8a43 0%, #28a745 100%); }
.btn-ficha { background: linear-gradient(135deg, #0066b3 0%, #0099e6 100%); }
.btn-vendedor { background: linear-gradient(135deg, #0f2744 0%, #1e3d6b 100%); }

/* ==========================================================================
   7. SINGLE PRODUCT VIEW STYLING
   ========================================================================== */
.alfamedical-single-product-wrap {
    max-width: 960px;
    margin: 30px auto;
    padding: 0 20px;
}

.am-single-header {
    margin-bottom: 25px;
    border-bottom: 1px solid var(--am-border-color);
    padding-bottom: 15px;
}

.am-breadcrumbs {
    font-size: 0.9rem;
    color: var(--am-text-muted);
    margin-bottom: 10px;
}

.am-breadcrumbs a {
    color: var(--am-primary);
    text-decoration: none;
}

.am-single-meta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.badge-sector {
    background: var(--am-primary);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
}

.badge-ref {
    background: #e2e8f0;
    color: #334155;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
}

.badge-pres {
    background: #dbeafe;
    color: #1e40af;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
}

.am-secondary-gallery {
    margin: 30px 0;
}

.am-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.gallery-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
    display: block;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.2s;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.am-single-whatsapp-cta {
    margin: 30px 0;
}

.cta-box {
    background: linear-gradient(135deg, #075e54 0%, #128c7e 100%);
    color: #ffffff;
    border-radius: var(--am-radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 6px 18px rgba(18, 140, 126, 0.25);
}

.cta-icon {
    font-size: 2.4rem;
}

.cta-content h4 {
    color: #ffffff;
    margin: 0 0 4px 0;
    font-size: 1.15rem;
}

.cta-content p {
    margin: 0;
    font-size: 0.95rem;
    opacity: 0.95;
}

.cta-whatsapp-btn {
    background: #25d366;
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: 700;
    padding: 12px 20px;
    border-radius: 8px;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: transform 0.2s;
}

.cta-whatsapp-btn:hover {
    transform: scale(1.04);
}

.btn-back {
    display: inline-block;
    color: var(--am-primary);
    text-decoration: none;
    font-weight: 600;
    margin-top: 20px;
}

/* ==========================================================================
   8. MÓDULO DE VIDEOS / PLAYLIST
   ========================================================================== */
.alfamedical-video-section {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
}

.alfamedical-video-playlist-container {
    display: flex;
    gap: 25px;
    background: #0f2744;
    border-radius: var(--am-radius);
    padding: 25px;
    color: #ffffff;
    box-shadow: var(--am-shadow-md);
}

.alfamedical-main-player {
    flex: 0 0 65%;
}

.current-video-title {
    color: #ffffff;
    margin-top: 15px;
    font-size: 1.25rem;
}

.alfamedical-video-list {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 15px;
    max-height: 460px;
    overflow-y: auto;
}

.alfamedical-video-list h4 {
    color: var(--am-accent-cyan);
    margin: 0 0 15px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 8px;
}

.alfamedical-video-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.video-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 8px;
}

.video-item:hover,
.video-item.active {
    background: rgba(0, 192, 243, 0.2);
}

.video-item .play-icon {
    color: var(--am-accent-cyan);
    font-size: 1rem;
}

/* ==========================================================================
   9. SECCIÓN DE CONTACTO & FORMULARIO
   ========================================================================== */
.alfamedical-contact-section {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
}

.alfamedical-contact-container {
    display: flex;
    gap: 40px;
    align-items: stretch;
}

.alfamedical-contact-info {
    flex: 0 0 45%;
}

.about-text {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--am-text-muted);
    margin-bottom: 25px;
}

.info-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.icon-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(0, 86, 150, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.info-text strong {
    color: var(--am-primary-dark);
    display: block;
    font-size: 0.95rem;
}

.info-text p {
    margin: 2px 0 0 0;
    color: var(--am-text-muted);
}

.info-text a {
    color: var(--am-primary);
    text-decoration: none;
    font-weight: 600;
}

.alfamedical-contact-form-wrap {
    flex: 1;
}

.form-card {
    background: #ffffff;
    border: 1px solid var(--am-border-color);
    border-radius: var(--am-radius);
    padding: 30px;
    box-shadow: var(--am-shadow-md);
}

.form-card h3 {
    color: var(--am-primary-dark);
    margin: 0 0 6px 0;
}

.form-card p {
    color: var(--am-text-muted);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--am-text-main);
    margin-bottom: 5px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.95rem;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--am-primary);
    box-shadow: 0 0 0 3px rgba(0, 86, 150, 0.15);
}

.am-submit-btn {
    width: 100%;
    background: var(--am-primary);
    color: #ffffff;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    transition: background 0.2s;
}

.am-submit-btn:hover {
    background: var(--am-primary-dark);
}

/* ==========================================================================
   10. BOTÓN FLOTANTE DE WHATSAPP
   ========================================================================== */
.alfamedical-floating-whatsapp {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background-color: #25d366;
    color: #ffffff !important;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
    z-index: 99999;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    animation: am-pulse 2s infinite;
}

.alfamedical-floating-whatsapp:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 22px rgba(37, 211, 102, 0.6);
}

@keyframes am-pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6); }
    70% { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ==========================================================================
   11. RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 992px) {
    .alfamedical-hero-container {
        flex-direction: column;
        text-align: center;
    }
    .alfamedical-hero-left {
        order: 2;
    }
    .alfamedical-hero-buttons {
        margin: 0 auto;
    }
    .alfamedical-carousel-slide {
        flex: 0 0 calc((100% - 20px) / 2); /* 2 productos en tablet */
    }
    .alfamedical-product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .alfamedical-video-playlist-container {
        flex-direction: column;
    }
    .alfamedical-contact-container {
        flex-direction: column;
    }
    .cta-box {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 640px) {
    .alfamedical-hero-title {
        font-size: 2rem;
    }
    .alfamedical-carousel-slide {
        flex: 0 0 100%; /* 1 producto en móviles */
    }
    .alfamedical-product-grid {
        grid-template-columns: 1fr;
    }
    .form-row {
        flex-direction: column;
    }
    .alfamedical-floating-whatsapp span.btn-label {
        display: none;
    }
    .alfamedical-floating-whatsapp {
        padding: 14px;
        border-radius: 50%;
    }
}
