/* ==========================================================================
   DESIGN SYSTEM - CERTIFICA REDESIGN
   Colores: Primary (#3B1B72), Accent (#8B5CF6), Background (#FFFFFF), Text (#1E293B)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    /* Color Palette */
    --primary: #3B1B72;
    --primary-light: #4c2592;
    --primary-dark: #2a1253;
    --accent: #8B5CF6;
    --accent-hover: #7c3aed;
    --accent-light: #c084fc;
    --bg-main: #ffffff;
    --bg-alt: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --text-on-primary: #ffffff;
    --border: #e2e8f0;
    
    /* Dynamic Theme Variables (can override in body.theme-dark) */
    --shadow-sm: 0 2px 4px rgba(59, 27, 114, 0.05);
    --shadow-md: 0 10px 25px rgba(59, 27, 114, 0.08);
    --shadow-lg: 0 20px 40px rgba(59, 27, 114, 0.12);
    --glow: 0 0 20px rgba(139, 92, 246, 0.3);
    
    /* Layout */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme overrides if requested/toggled */
body.theme-dark {
    --bg-main: #0b0716;
    --bg-alt: #130c24;
    --bg-card: #1b1230;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: #2e1d4d;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.4);
}

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

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.25;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast), transform var(--transition-fast);
}

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

ul {
    list-style: none;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-alt);
}
::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: var(--radius-full);
    border: 2px solid var(--bg-main);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Utilities */
.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 100px 0;
    position: relative;
}

.section-alt {
    background-color: var(--bg-alt);
}

.text-center {
    text-align: center;
}

.section-title-wrapper {
    max-width: 700px;
    margin: 0 auto 60px;
}

.badge-tag {
    display: inline-block;
    padding: 6px 16px;
    background-color: rgba(139, 92, 246, 0.1);
    color: var(--accent);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--text-main) 30%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--accent);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.4);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-secondary:hover {
    background-color: var(--primary);
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-white {
    background-color: #ffffff;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

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

.btn-accent-outline {
    background-color: transparent;
    color: var(--accent);
    border-color: var(--accent);
}

.btn-accent-outline:hover {
    background-color: var(--accent);
    color: #ffffff;
    transform: translateY(-2px);
}

/* Header & Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all var(--transition-normal);
    border-bottom: 1px solid transparent;
}

.header-scrolled {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-color: rgba(59, 27, 114, 0.08);
    box-shadow: var(--shadow-sm);
}

body.theme-dark .header-scrolled {
    background-color: rgba(11, 7, 22, 0.85);
    border-color: rgba(255, 255, 255, 0.05);
}

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

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 48px;
    max-height: 48px;
    width: auto;
    display: block;
    transition: transform var(--transition-fast);
}

.logo-wrapper:hover .logo-img {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    position: relative;
    padding: 8px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: width var(--transition-fast);
}

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

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

/* Dropdown Menu styling */
.nav-item-dropdown {
    position: relative;
}

.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    min-width: 240px;
    padding: 12px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    z-index: 100;
}

.nav-item-dropdown:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-link {
    display: block;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    color: var(--text-main);
}

.dropdown-link:hover {
    background-color: var(--bg-alt);
    color: var(--accent);
    padding-left: 20px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--text-main);
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.theme-toggle:hover {
    background-color: var(--bg-alt);
    color: var(--accent);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-main);
    transition: all var(--transition-fast);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    padding-top: 140px;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 10% 80%, rgba(59, 27, 114, 0.05) 0%, transparent 50%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.15;
    margin-bottom: 24px;
    font-weight: 800;
    letter-spacing: -1px;
}

.hero-content h1 span {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 580px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    gap: 40px;
    border-top: 1px solid var(--border);
    padding-top: 32px;
}

.stat-item h3 {
    font-size: 2.2rem;
    color: var(--primary);
    font-weight: 800;
    margin-bottom: 4px;
}

.stat-item p {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin: 0;
}

/* Card Simulator Container */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.simulator-wrapper {
    width: 100%;
    max-width: 380px;
    perspective: 1000px;
}

/* The floating Digital ID Card */
.digital-badge {
    width: 100%;
    height: 520px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform var(--transition-slow);
    cursor: grab;
}

.digital-badge:active {
    cursor: grabbing;
}

.badge-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: box-shadow var(--transition-normal);
}

.badge-front {
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 45%, #180b30 100%);
    color: #ffffff;
    padding: 32px 24px;
    justify-content: space-between;
}

.badge-back {
    background: #ffffff;
    color: var(--text-main);
    transform: rotateY(180deg);
    padding: 32px 24px;
    border: 1px solid var(--border);
    justify-content: space-between;
}

/* Front Face Elements */
.badge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 16px;
}

.badge-logo {
    font-weight: 800;
    font-size: 1.25rem;
    font-family: 'Outfit', sans-serif;
    color: #ffffff;
}

.badge-logo span {
    color: var(--accent-light);
}

.badge-chip {
    width: 32px;
    height: 24px;
    background: linear-gradient(135deg, #ffd700 0%, #cca300 100%);
    border-radius: 4px;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

.badge-chip::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.badge-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 20px 0;
}

.badge-avatar-container {
    position: relative;
    margin-bottom: 16px;
}

.badge-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 4px solid var(--accent);
    object-fit: cover;
    background-color: var(--bg-alt);
    box-shadow: var(--shadow-md);
}

.badge-status-dot {
    width: 14px;
    height: 14px;
    background-color: #10b981;
    border: 2px solid var(--primary-dark);
    border-radius: 50%;
    position: absolute;
    bottom: 5px;
    right: 5px;
}

.badge-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
    font-family: 'Outfit', sans-serif;
}

.badge-role {
    font-size: 0.85rem;
    color: var(--accent-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.badge-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.badge-info-label {
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 2px;
}

.badge-info-value {
    color: #ffffff;
    font-weight: 600;
}

.badge-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 16px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
}

.badge-security-text {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #10b981;
    font-weight: 600;
}

/* Back Face Elements */
.badge-back-header {
    text-align: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}

.badge-back-title {
    font-size: 1rem;
    color: var(--primary);
    font-weight: 700;
}

.badge-qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px 0;
}

.badge-qr {
    width: 160px;
    height: 160px;
    border: 1px solid var(--border);
    padding: 8px;
    border-radius: var(--radius-md);
    background-color: white;
}

.badge-qr-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 8px;
    font-weight: 500;
}

.badge-back-info {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

.badge-barcode {
    height: 35px;
    width: 100%;
    margin-top: 8px;
    background: repeating-linear-gradient(90deg, #1e293b, #1e293b 2px, transparent 2px, transparent 6px);
}

/* Interactive Input Panel under visual */
.simulator-panel {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-top: 24px;
    box-shadow: var(--shadow-md);
}

.panel-title {
    font-size: 0.95rem;
    margin-bottom: 12px;
    color: var(--primary);
    font-weight: 700;
}

.panel-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text-main);
    background-color: var(--bg-main);
    margin-bottom: 12px;
    transition: border-color var(--transition-fast);
}

.panel-input:focus {
    outline: none;
    border-color: var(--accent);
}

.panel-controls {
    display: flex;
    gap: 8px;
}

.panel-btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background-color: var(--bg-main);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.panel-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.panel-btn-active {
    background-color: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
}

.panel-btn-active:hover {
    background-color: var(--accent-hover);
    color: #ffffff;
}

/* Sectores Section */
.sectors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.sector-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.sector-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 6px; height: 0;
    background-color: var(--accent);
    transition: height var(--transition-normal);
}

.sector-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(139, 92, 246, 0.2);
}

.sector-card:hover::before {
    height: 100%;
}

.sector-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    background-color: rgba(59, 27, 114, 0.05);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 28px;
    transition: all var(--transition-normal);
}

.sector-card:hover .sector-icon {
    background-color: var(--accent);
    color: #ffffff;
    transform: scale(1.1);
}

.sector-card h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--primary);
}

.sector-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Logo Slider Section */
.brand-slider-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
    background-color: var(--bg-card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.brand-slider {
    display: flex;
    width: calc(250px * 70);
    animation: scroll 80s linear infinite;
}

.brand-slide {
    width: 250px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 30px;
}

.brand-slide img {
    max-height: 48px;
    max-width: 180px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.5;
    transition: all var(--transition-fast);
}

.brand-slide img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-250px * 35)); }
}

/* Features Section */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    align-items: center;
}

.features-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.feature-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: all var(--transition-normal);
}

.feature-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.feature-card i {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 16px;
    display: block;
}

.feature-card h4 {
    font-size: 1.15rem;
    margin-bottom: 8px;
    color: var(--primary);
}

.feature-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.features-visual {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.features-visual img {
    width: 100%;
}

.features-visual-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(59, 27, 114, 0.4) 0%, rgba(139, 92, 246, 0.4) 100%);
}

/* Products (Carnetización Física) Section */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.product-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(139, 92, 246, 0.2);
}

.product-img-wrapper {
    height: 220px;
    background-color: var(--bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 24px;
}

.product-img-wrapper img {
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal);
}

.product-card:hover .product-img-wrapper img {
    transform: scale(1.06) rotate(1deg);
}

.product-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background-color: #10b981;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
}

.product-content {
    padding: 32px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-title {
    font-size: 1.35rem;
    margin-bottom: 8px;
    color: var(--primary);
}

.product-type {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.product-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 24px;
}

.product-actions {
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

/* Tarjetas Digitales Networking Section */
.networking-wrapper {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 60px;
    align-items: center;
}

.networking-visual {
    text-align: center;
    position: relative;
}

.networking-card-mockup {
    max-width: 85%;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transform: rotate(-3deg);
    transition: transform var(--transition-normal);
}

.networking-card-mockup:hover {
    transform: rotate(0deg) scale(1.02);
}

.networking-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 32px;
}

.net-feat-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.net-feat-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(139, 92, 246, 0.1);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.net-feat-content h4 {
    font-size: 1rem;
    margin-bottom: 4px;
    color: var(--primary);
}

.net-feat-content p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Sostenibilidad Section */
.sustainability-card {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    border-radius: var(--radius-lg);
    color: #ffffff;
    padding: 60px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.sustainability-card::after {
    content: '';
    position: absolute;
    top: -50%; right: -20%; width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.sustainability-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.sustainability-content h2 {
    color: #ffffff;
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.sustainability-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 32px;
}

.sustainability-tags {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.tag-eco {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
}

.sustainability-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.eco-heart {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4.5rem;
    color: #ffffff;
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 20px rgba(255, 255, 255, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

/* Security Section */
.security {
    background-color: var(--primary);
    color: #ffffff;
    overflow: hidden;
}

.security h2, .security .section-desc {
    color: #ffffff;
}

.security-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.security-card {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 32px;
    transition: all var(--transition-normal);
}

.security-card:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: var(--accent);
    transform: translateY(-5px);
}

.security-card i {
    font-size: 2.2rem;
    color: var(--accent-light);
    margin-bottom: 20px;
    display: block;
}

.security-card h3 {
    color: #ffffff;
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.security-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    line-height: 1.6;
}

.security-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    margin-top: 56px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
}

.security-law {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
}

/* Footer Section */
.footer {
    background-color: var(--bg-alt);
    border-top: 1px solid var(--border);
    padding: 80px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 0.8fr 0.9fr 0.8fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-info .logo-img {
    height: 48px;
    max-height: 48px;
    width: auto;
}

.footer-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 20px;
    margin-bottom: 24px;
    max-width: 280px;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-main);
    color: var(--primary);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all var(--transition-fast);
}

.social-btn:hover {
    background-color: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
    transform: translateY(-3px);
}

.footer-col h3 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 8px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; width: 30px; height: 2px;
    background-color: var(--accent);
}

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

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--accent);
    padding-left: 4px;
}

.footer-contact li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.footer-contact i {
    color: var(--accent);
    font-size: 1.1rem;
    margin-top: 4px;
}

.footer-contact a {
    color: inherit;
}

.footer-contact a:hover {
    color: var(--accent);
}

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

.footer-bottom-links {
    display: flex;
    gap: 24px;
}

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

/* Floating Whatsapp button */
.whatsapp-float {
    position: fixed;
    bottom: 32px;
    left: 32px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: all var(--transition-normal);
}

.whatsapp-float:hover {
    transform: scale(1.08) translateY(-4px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */

@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    
    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .features-visual {
        order: -1;
    }
    
    .networking-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .sustainability-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .sustainability-tags {
        justify-content: center;
    }
    
    .sustainability-visual {
        margin-top: 20px;
    }
    
    .security-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none; /* In production JS toggles class mobile-active */
    }
    
    .hamburger {
        display: flex;
    }
    
    /* Mobile Menu Drawer style (triggered by class on nav-menu) */
    .nav-menu.mobile-active {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: var(--bg-card);
        padding: 40px 24px;
        box-shadow: var(--shadow-lg);
        border-top: 1px solid var(--border);
        border-bottom: 1px solid var(--border);
        z-index: 99;
        gap: 20px;
    }
    
    .nav-menu.mobile-active .nav-dropdown {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        border: none;
        background-color: var(--bg-alt);
        margin-top: 10px;
        width: 100%;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-content h1 {
        font-size: 2.6rem;
    }
    
    .security-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

/* ==========================================================================
   TABS COMPONENT - CERTIFICA
   ========================================================================== */
.tabs-nav-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    background-color: var(--bg-alt);
    border: 1px solid var(--border);
    padding: 8px;
    border-radius: var(--radius-lg);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.tab-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    background-color: transparent;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: 'Outfit', sans-serif;
}

.tab-nav-btn i {
    font-size: 1.2rem;
}

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

body.theme-dark .tab-nav-btn:hover {
    color: #ffffff;
}

.tab-nav-btn.active {
    color: #ffffff;
    background-color: var(--accent);
    box-shadow: var(--glow);
}

body.theme-light .tab-nav-btn.active {
    color: #ffffff;
    background-color: var(--primary);
    box-shadow: 0 4px 12px rgba(59, 27, 114, 0.2);
}

/* Tab Panel Content */
.tabs-content-wrapper {
    position: relative;
    width: 100%;
}

.tab-content-panel {
    display: none;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.tab-content-panel.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.tab-pane-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: center;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.tab-pane-info h3 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-top: 8px;
    margin-bottom: 16px;
}

body.theme-dark .tab-pane-info h3 {
    color: #ffffff;
}

.tab-pane-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.tab-pane-info p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 24px;
}

.tab-pane-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tab-pane-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
}

.tab-pane-list li i {
    color: #10b981;
    font-size: 1.2rem;
}

/* Visual Card Inside Tab */
.tab-pane-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.tab-visual-card {
    background: linear-gradient(135deg, rgba(59, 27, 114, 0.02) 0%, rgba(139, 92, 246, 0.04) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 30px;
    width: 100%;
    max-width: 280px;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.animated-shield {
    font-size: 3.5rem;
    color: var(--accent);
    margin-bottom: 15px;
    animation: shieldGlow 2s infinite ease-in-out;
}

@keyframes shieldGlow {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(139, 92, 246, 0)); }
    50% { transform: scale(1.04); filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.4)); }
}

.qr-pulse-wrapper {
    position: relative;
    padding: 8px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.qr-pulse-line {
    position: absolute;
    width: calc(100% - 16px);
    height: 3px;
    background-color: var(--accent);
    top: 8px;
    left: 8px;
    animation: qrScan 2.5s infinite linear;
}

@keyframes qrScan {
    0% { top: 8px; }
    50% { top: calc(100% - 11px); }
    100% { top: 8px; }
}

.mini-db-stats {
    width: 100%;
    margin-top: 12px;
    background-color: var(--bg-alt);
    border: 1px solid var(--border);
    padding: 10px;
    border-radius: 6px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    padding: 3px 0;
    color: var(--text-main);
}

/* Responsiveness for Tabs */
@media (max-width: 991px) {
    .tabs-nav-container {
        flex-wrap: wrap;
        width: 100%;
        gap: 6px;
    }
    
    .tab-nav-btn {
        flex: 1 1 calc(50% - 6px);
        justify-content: center;
        padding: 10px;
        font-size: 0.85rem;
    }
    
    .tab-pane-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 24px;
    }
    
    .tab-pane-info h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .tab-nav-btn {
        flex: 1 1 100%;
    }
}

/* ==========================================================================
   APP SEGMENTED CONTROL & MOCK MOBILE VIEWER
   ========================================================================== */
.app-segmented-control {
    display: flex;
    background-color: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 4px;
    width: 100%;
    max-width: 550px;
    margin: 0 auto 40px;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.segment-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 4px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.segment-btn i {
    font-size: 1.25rem;
}

.segment-btn:hover {
    color: var(--primary);
}

body.theme-dark .segment-btn:hover {
    color: #ffffff;
}

.segment-btn.active {
    color: #ffffff;
    background-color: var(--accent);
    box-shadow: var(--glow);
}

body.theme-light .segment-btn.active {
    color: #ffffff;
    background-color: var(--primary);
    box-shadow: 0 4px 10px rgba(59, 27, 114, 0.15);
}

@media (max-width: 500px) {
    .app-segmented-control {
        border-radius: 12px;
    }
    .segment-btn {
        font-size: 0.65rem;
        padding: 8px 2px;
    }
    .segment-btn i {
        font-size: 1.1rem;
    }
}

/* Mock App Screen Inside Tab */
.mock-app-screen {
    width: 100%;
    max-width: 300px;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow-md), 0 0 0 4px #23153c;
    margin: 20px auto 0;
    font-family: 'Inter', sans-serif;
    text-align: left;
}

.mock-screen-header {
    background-color: var(--primary);
    color: white;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mock-screen-header i {
    font-size: 1rem;
}

.mock-screen-body {
    padding: 14px;
    background-color: var(--bg-alt);
    min-height: 180px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Specific elements for mock body */
.mock-search-bar {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.72rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.mock-user-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mock-user-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    padding: 8px 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}

.mock-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mock-user-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: rgba(139, 92, 246, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
}

.mock-user-details h5 {
    font-size: 0.72rem;
    margin: 0;
    color: var(--text-main);
    font-weight: 600;
}

.mock-user-details span {
    font-size: 0.6rem;
    color: var(--text-muted);
    display: block;
}

/* Switch styling for mockup */
.mock-switch {
    width: 32px;
    height: 18px;
    background-color: #cbd5e1;
    border-radius: 9px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.mock-switch::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: white;
    top: 2px;
    left: 2px;
    transition: left 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.mock-switch.active {
    background-color: #10b981;
}

.mock-switch.active::after {
    left: 16px;
}

/* Mock History List */
.mock-history-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mock-history-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    padding: 8px 10px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.mock-history-left {
    display: flex;
    flex-direction: column;
}

.mock-history-name {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-main);
}

.mock-history-time {
    font-size: 0.6rem;
    color: var(--text-muted);
}

.mock-history-badge {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
}

.badge-ontime {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.badge-late {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.badge-absent {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Mock Color Customizer */
.mock-customizer {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mock-color-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mock-color-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-main);
}

.mock-color-options {
    display: flex;
    gap: 6px;
}

.mock-color-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.15s ease;
}

.mock-color-dot:active {
    transform: scale(0.9);
}

.mock-color-dot.selected {
    border-color: var(--text-main);
    transform: scale(1.1);
}

.mock-preview-badge {
    background-color: var(--primary);
    color: white;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    transition: background-color 0.3s ease;
}

/* ==========================================================================
   COMPONENT: NEWS CARDS (COMPARTIDO ENTRE NOTICIAS E INDEX)
   ========================================================================== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.news-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.news-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.news-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid var(--border);
}

.news-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-weight: 500;
}

.news-card h3 {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 12px;
    line-height: 1.4;
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 3.36rem;
}

.news-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 4.05rem;
}

.news-card-btn {
    margin-top: auto;
    align-self: flex-start;
    padding: 10px 18px;
    font-size: 0.85rem;
    font-weight: 700;
}

@media (max-width: 991px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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