/* ========================================
   DR. MANCO - AHORA NACIÓN
   BASE CSS - Estilos compartidos
======================================== */

/* CSS Variables */
:root {
    --bg-dark: #0d0d0d;
    --bg-darker: #080808;
    --bg-card: #1a1a1a;
    --bg-card-hover: #242424;

    /* Rojo Principal - Strict Palette */
    --primary: #DC2626;
    --primary-light: #EF4444;
    --primary-dark: #991B1B;
    --primary-darker: #7F1D1D;

    /* Background Accents */
    --red-50: #FEF2F2;
    --red-100: #FEE2E2;
    --red-200: #FECACA;

    /* Blanco y Grises */
    --white: #ffffff;
    --white-soft: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;

    --font-main: 'Poppins', sans-serif;

    /* Shadows */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 30px rgba(220, 38, 38, 0.3);
    --shadow-hover: 0 20px 25px -5px rgba(220, 38, 38, 0.15);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* GLOBAL ANIMATIONS */
@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(220, 38, 38, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-5px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--white);
    color: var(--bg-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   PRELOADER
======================================== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.preloader-logo-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 30px;
}

.preloader-logo-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 4px solid rgba(220, 38, 38, 0.15);
    border-top-color: #DC2626;
    border-right-color: #DC2626;
    animation: preloaderRingSpin 1.5s linear infinite;
}

.preloader-logo-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.preloader-name {
    font-size: 28px;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: 1px;
    line-height: 1.2;
}

.preloader-role {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.preloader-role-text {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.preloader-role-number {
    background: #DC2626;
    color: white;
    font-size: 22px;
    font-weight: 900;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.preloader-party {
    font-size: 12px;
    font-weight: 500;
    color: #DC2626;
    letter-spacing: 5px;
    text-transform: uppercase;
    margin-top: 6px;
}

.preloader-bar-track {
    width: 180px;
    height: 3px;
    background: rgba(220, 38, 38, 0.1);
    border-radius: 3px;
    margin-top: 30px;
    overflow: hidden;
}

.preloader-bar-fill {
    width: 0%;
    height: 100%;
    background: #DC2626;
    border-radius: 3px;
    animation: preloaderBarFill 3s ease-in-out forwards;
}

@keyframes preloaderRingSpin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes preloaderBarFill {
    0% {
        width: 0%;
    }

    50% {
        width: 60%;
    }

    90% {
        width: 90%;
    }

    100% {
        width: 100%;
    }
}

/* Old preloader styles (kept for compat) */
.preloader-number {
    font-size: 120px;
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
    text-shadow: 0 0 50px var(--primary-glow);
    animation: pulse 1.5s ease-in-out infinite;
}

.preloader-text {
    font-size: 28px;
    font-weight: 700;
    color: var(--bg-dark);
    margin-top: 10px;
}

.preloader-subtext {
    font-size: 14px;
    color: var(--gray-500);
    letter-spacing: 3px;
    margin-top: 5px;
}

.preloader-loader {
    width: 60px;
    height: 3px;
    background: var(--gray-200);
    margin: 30px auto 0;
    border-radius: 3px;
    overflow: hidden;
}

.preloader-loader::after {
    content: '';
    display: block;
    width: 30%;
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
    animation: loading 1s ease-in-out infinite;
}

@keyframes loading {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(400%);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* ========================================
   NAVBAR
======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    background: #CC0000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
}

.navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg,
            var(--white) 0%,
            rgba(255, 255, 255, 0.3) 25%,
            var(--white) 50%,
            rgba(255, 255, 255, 0.3) 75%,
            var(--white) 100%);
    background-size: 200% 100%;
    animation: navbarLineMove 2s linear infinite;
}

@keyframes navbarLineMove {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 200% 0%;
    }
}

.navbar.scrolled {
    padding: 10px 0;
    background: var(--primary-dark);
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    flex-direction: column;
}

.nav-logo .logo-name {
    font-size: 22px;
    font-weight: 800;
    color: var(--white);
}

.nav-logo .logo-party {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 2px;
    font-weight: 600;
}

.nav-menu {
    display: flex;
    gap: 35px;
}

.nav-link {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    transition: var(--transition);
    position: relative;
    padding: 8px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-cta {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--white);
    color: var(--primary);
    padding: 10px 25px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    transition: var(--transition);
}

.nav-cta:hover {
    background: var(--gray-100);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition);
}

/* ========================================
   SECTION STYLES (shared)
======================================== */
.section-tag {
    display: inline-block;
    font-size: 12px;
    color: var(--primary);
    letter-spacing: 3px;
    font-weight: 600;
    margin-bottom: 15px;
}

.section-title {
    font-size: 42px;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 20px;
    line-height: 1.2;
}

.section-title .highlight {
    color: var(--primary);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

/* ========================================
   BUTTONS (shared)
======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 35px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--white);
    color: var(--primary);
}

.btn-primary:hover {
    background: var(--gray-100);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-white {
    background: var(--white);
    color: var(--primary);
}

.btn-white:hover {
    background: var(--gray-100);
    transform: translateY(-3px);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* ========================================
   FORMS (shared)
======================================== */
.form-group {
    position: relative;
    margin-bottom: 20px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 18px 20px 18px 50px;
    background: var(--bg-darker);
    border: 1px solid var(--bg-card-hover);
    border-radius: 15px;
    color: var(--white);
    font-size: 14px;
    font-family: var(--font-main);
    transition: var(--transition);
}

.form-group textarea {
    resize: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
}

.form-group textarea+i {
    top: 20px;
    transform: none;
}

/* ========================================
   FLOATING BUTTONS
======================================== */
.floating-container {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 30px;
    z-index: 100;
    opacity: 0;
    transform: translateY(-50%) scale(0.5);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes ripple {
    0% {
        transform: scale(0.8);
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 15px rgba(220, 38, 38, 0);
    }

    100% {
        transform: scale(0.8);
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
    }
}

.floating-circle {
    width: 80px;
    height: 80px;
    background: #DC2626;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 3px solid white;
    animation: ripple 2s infinite;
}

.floating-circle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    animation: none;
}

.logo-circle {
    padding: 0;
    overflow: hidden;
    background: white;
}

.fc-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.fn-number {
    font-size: 32px;
    font-weight: 900;
    line-height: 1;
    margin-top: -2px;
}

.fn-text {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: -2px;
    letter-spacing: 0.5px;
}

/* Old floating-number compat */
.floating-number {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--primary);
    padding: 15px 20px;
    border-radius: 50px;
    box-shadow: var(--shadow-glow), var(--shadow-md);
    cursor: pointer;
    transition: var(--transition);
    animation: floatPulse 2s ease-in-out infinite;
}

.floating-number:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 50px var(--primary-glow), var(--shadow-lg);
}

@keyframes floatPulse {

    0%,
    100% {
        box-shadow: var(--shadow-glow), var(--shadow-md);
    }

    50% {
        box-shadow: 0 0 40px var(--primary-glow), var(--shadow-lg);
    }
}

/* ========================================
   WHATSAPP FLOAT
======================================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: var(--white);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    transition: var(--transition);
    animation: whatsappPulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
}

@keyframes whatsappPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4);
    }

    50% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
}

/* ========================================
   FOOTER
======================================== */
.footer {
    background: #350000;
    padding: 80px 0 30px;
    color: var(--white);
    font-size: 14px;
    position: relative;
    border-top: 5px solid var(--primary);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 50px;
    margin-bottom: 60px;
}

.footer-logo {
    font-size: 32px;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 20px;
    display: flex;
    gap: 8px;
}

.logo-text-white {
    color: var(--white);
}

.logo-text-red {
    color: var(--primary);
}

.footer-quote {
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
    padding-left: 15px;
    border-left: 3px solid var(--primary);
    font-size: 15px;
}

.footer-info-list {
    list-style: none;
    padding: 0;
}

.footer-info-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.footer-info-list i {
    color: var(--primary);
}

.footer-heading {
    color: var(--white);
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.heading-line {
    display: block;
    width: 30px;
    height: 3px;
    background: var(--primary);
    margin-bottom: 25px;
}

.footer-links-col ul {
    list-style: none;
    padding: 0;
}

.footer-links-col li {
    margin-bottom: 12px;
}

.footer-links-col a,
.footer-legal a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
    text-decoration: none;
}

.footer-links-col a:hover,
.footer-legal a:hover {
    color: var(--white);
    padding-left: 5px;
}

.social-text {
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.7);
}

.footer-social-icons {
    display: flex;
    gap: 15px;
}

.footer-social-icons a {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: var(--transition);
    font-size: 18px;
}

.footer-social-icons a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom-new {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
}

.footer-bottom-row-1 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom-row-2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-legal {
    display: flex;
    gap: 15px;
    font-size: 13px;
}

.footer-bottom-row-1 p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    margin: 0;
}

.footer-made-in {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

.scroll-top-btn {
    background: #500000;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 700;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.scroll-top-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.footer-quote-small {
    font-style: italic;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
}

/* ========================================
   ANIMATIONS ON SCROLL
======================================== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   RESPONSIVE - SHARED
======================================== */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-darker);
        flex-direction: column;
        padding: 20px;
        gap: 0;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        padding: 15px 0;
        border-bottom: 1px solid var(--bg-card);
    }

    .nav-cta {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .section-title {
        font-size: 32px;
    }

    .floating-number {
        right: 15px;
        padding: 10px 15px;
    }

    .fn-number {
        font-size: 36px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-social,
    .social-links {
        justify-content: center;
    }

    .floating-number {
        bottom: 20px;
        right: 20px;
        width: 70px;
        height: 70px;
    }

    .fn-icon {
        width: 30px;
    }

    .fn-number {
        font-size: 20px;
    }

    .fn-text {
        font-size: 8px;
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom-row-1,
    .footer-bottom-row-2 {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .footer-legal {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
}

@media (max-width: 991px) {
    .container {
        padding: 0 30px;
    }
}