/* ===================================
   SiMon+ Landing Page
   Clean, hospital-inspired design
   =================================== */

:root {
    /* Colors - Hospital clean palette */
    --white: #ffffff;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #eeeeee;
    --gray-300: #e0e0e0;
    --gray-400: #bdbdbd;
    --gray-500: #9e9e9e;
    --gray-600: #757575;
    --gray-700: #616161;
    --gray-800: #424242;
    --gray-900: #212121;

    /* Accent colors */
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --primary-bg: #eff6ff;

    /* Semantic */
    --text-primary: var(--gray-900);
    --text-secondary: var(--gray-600);
    --text-muted: var(--gray-500);
    --bg-primary: var(--white);
    --bg-secondary: var(--gray-50);
    --bg-tertiary: var(--gray-100);
    --border-color: var(--gray-200);

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Spacing */
    --section-padding: 6rem;
    --container-padding: 1.5rem;
    --container-max: 1200px;

    /* Effects */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08), 0 4px 10px rgba(0, 0, 0, 0.05);
    --transition: all 0.2s ease;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

ul {
    list-style: none;
}

/* ===================================
   Layout
   =================================== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

section {
    padding: var(--section-padding) 0;
}

/* ===================================
   Typography
   =================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.75rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.plus {
    color: var(--primary);
}

/* ===================================
   Navigation
   =================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 1rem var(--container-padding);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
}

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

.nav-logo-img {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary);
}

.nav-cta {
    background: var(--primary);
    color: var(--white) !important;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-sm);
}

.nav-cta:hover {
    background: var(--primary-dark);
    color: var(--white) !important;
}

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

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* ===================================
   Hero Section
   =================================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 6rem var(--container-padding) 3rem;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    position: relative;
}

.hero-content {
    max-width: 700px;
}

.hero-logo {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero-tagline {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.app-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.app-button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: var(--gray-900);
    color: var(--white);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.app-button:hover {
    background: var(--gray-800);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.app-button-icon {
    width: 28px;
    height: 28px;
}

.app-button-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.app-button-small {
    font-size: 0.6875rem;
    opacity: 0.8;
}

.app-button-big {
    font-size: 1.125rem;
    font-weight: 600;
}

.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-indicator {
    display: flex;
    color: var(--text-muted);
    animation: bounce 2s infinite;
}

.scroll-indicator svg {
    width: 32px;
    height: 32px;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px);
    }
    60% {
        transform: translateY(-4px);
    }
}

/* ===================================
   Features Section
   =================================== */
.features {
    background: var(--bg-primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--gray-300);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-bg);
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--primary);
}

.feature-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-description {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

/* ===================================
   Trayectoria Section
   =================================== */
.trayectoria {
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.trayectoria-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.trayectoria-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary-bg);
    color: var(--primary);
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 9999px;
    margin-bottom: 1.5rem;
}

.trayectoria .section-title {
    margin-bottom: 1.5rem;
}

.trayectoria-text {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.trayectoria-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* ===================================
   Integraciones Section
   =================================== */
.integraciones {
    background: var(--bg-secondary);
}

.integraciones-content {
    max-width: 900px;
    margin: 0 auto;
}

.integraciones-text {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.integracion-item {
    display: flex;
    gap: 1.25rem;
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.integracion-item svg {
    width: 32px;
    height: 32px;
    stroke: var(--primary);
    flex-shrink: 0;
}

.integracion-item h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
}

.integracion-item p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.integraciones-cta {
    text-align: center;
    padding: 2.5rem;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.integraciones-cta p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.btn-secondary {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--primary);
    color: var(--white);
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--primary-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ===================================
   Seguridad Section
   =================================== */
.seguridad {
    background: var(--bg-primary);
}

.seguridad-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.seguridad-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.seguridad-card svg {
    width: 28px;
    height: 28px;
    stroke: var(--primary);
    flex-shrink: 0;
    margin-top: 2px;
}

.seguridad-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
}

.seguridad-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ===================================
   Privacidad Section
   =================================== */
.privacidad {
    background: var(--bg-secondary);
}

.privacidad-content {
    max-width: 1000px;
    margin: 0 auto;
}

.privacidad-intro {
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.privacidad-intro strong {
    color: var(--text-primary);
}

.privacidad-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.privacidad-item {
    padding: 1.75rem;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.privacidad-item h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.privacidad-item p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===================================
   CTA Section
   =================================== */
.cta-section {
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
    color: var(--white);
    text-align: center;
    padding: 5rem var(--container-padding);
}

.cta-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.75rem;
}

.cta-section p {
    font-size: 1.125rem;
    opacity: 0.8;
    margin-bottom: 2rem;
}

.cta-section .app-button {
    background: var(--white);
    color: var(--gray-900);
}

.cta-section .app-button:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

/* ===================================
   Footer
   =================================== */
.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-logo {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
}

.footer-logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.footer-tagline {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-links h4 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-developed a {
    font-weight: 600;
    color: var(--primary);
}

/* ===================================
   Responsive - Tablet
   =================================== */
@media (max-width: 1024px) {
    :root {
        --section-padding: 5rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .trayectoria-stats {
        gap: 2.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }

    .footer-brand {
        grid-column: span 2;
    }
}

/* ===================================
   Responsive - Mobile
   =================================== */
@media (max-width: 768px) {
    :root {
        --section-padding: 4rem;
        --container-padding: 1.25rem;
    }

    /* Navigation mobile */
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg-primary);
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        transition: right 0.3s ease;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-link {
        font-size: 1.125rem;
    }

    .nav-cta {
        width: 100%;
        text-align: center;
        padding: 0.75rem 1.5rem;
    }

    /* Hero mobile */
    .hero {
        min-height: auto;
        padding: 8rem var(--container-padding) 4rem;
    }

    .hero-logo {
        width: 80px;
        height: 80px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-tagline {
        font-size: 1.25rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .app-buttons {
        flex-direction: column;
        align-items: center;
    }

    .app-button {
        width: 100%;
        max-width: 240px;
        justify-content: center;
    }

    .hero-scroll {
        display: none;
    }

    /* Section titles */
    .section-title {
        font-size: 1.5rem;
    }

    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    /* Features mobile */
    .features-grid {
        grid-template-columns: 1fr;
    }

    .feature-card {
        padding: 1.5rem;
    }

    /* Trayectoria mobile */
    .trayectoria-stats {
        gap: 2rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    /* Integraciones mobile */
    .integracion-item {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .integracion-item svg {
        margin: 0 auto;
    }

    /* Seguridad mobile */
    .seguridad-grid {
        grid-template-columns: 1fr;
    }

    /* Privacidad mobile */
    .privacidad-grid {
        grid-template-columns: 1fr;
    }

    /* CTA mobile */
    .cta-section h2 {
        font-size: 1.5rem;
    }

    .cta-section .app-buttons {
        flex-direction: column;
        align-items: center;
    }

    /* Footer mobile */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-brand {
        align-items: center;
        grid-column: span 1;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

/* ===================================
   Responsive - Small Mobile
   =================================== */
@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-tagline {
        font-size: 1.125rem;
    }

    .trayectoria-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .seguridad-card {
        flex-direction: column;
        text-align: center;
    }

    .seguridad-card svg {
        margin: 0 auto;
    }
}

/* ===================================
   Accessibility
   =================================== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus states */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .navbar,
    .hero-scroll,
    .app-buttons,
    .cta-section {
        display: none;
    }

    section {
        padding: 2rem 0;
    }
}

/* ===================================
   Account Deletion Popup
   =================================== */
.popup-overlay {
    display: none;
    visibility: hidden;
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    padding: 1rem;
    overflow-y: auto;
    justify-content: center;
    align-items: flex-start;
}

.popup-overlay.active {
    display: flex;
    visibility: visible;
    pointer-events: auto;
}

.popup-content {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 100%;
    margin: 2rem auto;
    padding: 2rem;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    animation: popupSlideIn 0.3s ease;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-secondary);
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-close:hover {
    background: var(--gray-200);
    color: var(--text-primary);
}

.popup-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.popup-logo {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    margin: 0 auto 0.75rem;
    box-shadow: var(--shadow-md);
}

.popup-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.popup-developer {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.popup-content > h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.popup-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.popup-section:last-of-type {
    border-bottom: none;
    margin-bottom: 1rem;
    padding-bottom: 0;
}

.popup-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.popup-section ol,
.popup-section ul {
    padding-left: 1.25rem;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.popup-section ol {
    list-style: decimal;
}

.popup-section ul {
    list-style: disc;
}

.popup-section li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.popup-section p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.popup-section a {
    color: var(--primary);
    font-weight: 500;
}

.popup-section a:hover {
    text-decoration: underline;
}

.popup-note {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: var(--primary-bg);
    border-radius: var(--radius-sm);
    font-size: 0.875rem !important;
}

.popup-button {
    display: block;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.popup-button:hover {
    background: var(--primary-dark);
}

/* Popup responsive */
@media (max-width: 768px) {
    .popup-content {
        padding: 1.5rem;
        margin: 1rem;
    }

    .popup-logo {
        width: 56px;
        height: 56px;
    }

    .popup-header h2 {
        font-size: 1.25rem;
    }

    .popup-content > h3 {
        font-size: 1.125rem;
    }

    .popup-section h4 {
        font-size: 0.9375rem;
    }

    .popup-section ol,
    .popup-section ul,
    .popup-section p {
        font-size: 0.875rem;
    }
}
