/* ==========================================================================
   SYSTEM DESIGN: JESED PANAMÁ - MODERN AND SECURE CSS STYLESHEET
   ========================================================================== */

/* Variables CSS - Palette, Font Systems and Transitions */
:root {
    /* Color Palette */
    --primary-color: #1e2759;     /* Deep Navy Blue */
    --secondary-color: #14268c;   /* Royal/Cobalt Blue */
    --accent-color: #4a5fe0;      /* Modern Vibrant Blue */
    --accent-hover: #374cc9;
    --accent-soft: rgba(74, 95, 224, 0.1);
    
    /* Semantic Neutrals */
    --bg-main: #f8fafc;           /* Light Blue-Gray background */
    --bg-card: #ffffff;
    --text-main: #0f172a;         /* Slate 900 */
    --text-muted: #475569;        /* Slate 600 */
    --text-light: #94a3b8;        /* Slate 400 */
    --border-color: #e2e8f0;      /* Slate 200 */
    
    /* Transparent / Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: rgba(15, 23, 42, 0.04);
    
    /* Fonts family */
    --font-title: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.02);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.06);
    --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
    
    /* Transitions */
    --transition-all: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.2s ease;
    
    /* Layout Constants */
    --header-height-large: 90px;
    --header-height-small: 70px;
    --max-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

ul, ol {
    list-style: none;
}

button, input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    outline: none;
}

button {
    cursor: pointer;
    background: none;
    border: none;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Focus outline for Accessibility */
:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 4px;
}

/* Container Utilities */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

/* Honeypot Form Anti-Spam Field - Invisible to Humans but filled by Bots */
.hp-field {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ==========================================================================
   SPA ROUTER / VIEW VIEWS SYSTEM
   ========================================================================== */
.view-section {
    display: none;
    opacity: 0;
}

.view-section.active-view {
    display: block;
    animation: fadeUpIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeUpIn {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   BUTTONS SYSTEM
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-all);
    box-shadow: var(--shadow-sm);
    text-transform: capitalize;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    color: #ffffff;
    border: none;
}

.btn-primary:hover {
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(20, 38, 140, 0.2);
}

.btn-secondary {
    background-color: #ffffff;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-main);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-icon {
    transition: var(--transition-fast);
}

.btn:hover .btn-icon {
    transform: translate(2px, -2px);
}

/* ==========================================================================
   HEADER / NAVBAR
   ========================================================================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height-large);
    background-color: var(--glass-bg);
    border-bottom: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    transition: var(--transition-all);
    display: flex;
    align-items: center;
}

/* Shrinking header on scroll class added by JS */
.main-header.scrolled {
    height: var(--header-height-small);
    box-shadow: var(--shadow-md);
    background-color: rgba(255, 255, 255, 0.9);
}

.header-container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-link {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 38px;
    width: auto;
    transition: var(--transition-all);
}

.main-header.scrolled .logo-img {
    height: 32px;
}

.desktop-nav ul {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-family: var(--font-title);
    font-weight: 500;
    font-size: 1.05rem;
    color: var(--text-muted);
    padding: 8px 0;
    position: relative;
    transition: var(--transition-fast);
}

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

/* Underline slide effect on hover */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Mobile Toggle Hamburger Button */
.mobile-menu-toggle {
    display: none;
    color: var(--primary-color);
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition-fast);
}

.mobile-menu-toggle:hover {
    background-color: var(--accent-soft);
}

/* Mobile Nav Menu Overlay */
.mobile-menu {
    position: fixed;
    top: var(--header-height-large);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height-large));
    background-color: #ffffff;
    z-index: 999;
    padding: 32px 24px;
    transform: translateX(100%);
    transition: var(--transition-all);
    display: flex;
    flex-direction: column;
}

.mobile-menu.open {
    transform: translateX(0);
}

.main-header.scrolled + .mobile-menu {
    top: var(--header-height-small);
    height: calc(100vh - var(--header-height-small));
}

.mobile-menu ul {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-nav-link {
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 1.4rem;
    color: var(--text-main);
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.mobile-nav-link.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

/* Main margins to prevent overlap with header */
main {
    margin-top: var(--header-height-large);
    min-height: 70vh;
}

/* ==========================================================================
   VIEW: INICIO (HOME)
   ========================================================================== */

/* Hero Section */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #ffffff;
    padding: 120px 0 100px;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 10% 20%, rgba(74, 95, 224, 0.15) 0%, transparent 50%),
                      radial-gradient(circle at 90% 80%, rgba(20, 38, 140, 0.25) 0%, transparent 60%);
    pointer-events: none;
}

.hero-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

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

.hero-badge {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hero-title {
    font-family: var(--font-title);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
    margin-bottom: 40px;
    line-height: 1.6;
}

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

/* Brand Highlight Section */
.brand-section {
    padding: 80px 0;
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
}

.brand-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 48px;
    align-items: center;
}

.brand-logo-card {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 48px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-all);
}

.brand-logo-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.brand-label {
    font-family: var(--font-title);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 32px;
}

.brand-logo-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    padding: 20px 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.brand-logo {
    max-height: 48px;
    width: auto;
}

.brand-title {
    font-family: var(--font-title);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.brand-text {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 28px;
    line-height: 1.7;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--secondary-color);
}

.brand-link svg {
    transition: transform 0.2s ease;
}

.brand-link:hover svg {
    transform: translateX(4px);
}

/* Commitment Section */
.commitment-section {
    padding: 100px 0;
    background-color: var(--bg-main);
}

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

.section-title {
    font-family: var(--font-title);
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.section-text {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 60px;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.commitment-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    text-align: left;
    margin-bottom: 50px;
}

.feature-item {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-all);
}

.feature-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--accent-soft);
    color: var(--accent-color);
    width: 52px;
    height: 52px;
    border-radius: 12px;
    margin-bottom: 24px;
}

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

.feature-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.commitment-cta {
    margin-top: 24px;
}

/* ==========================================================================
   VIEW: NOSOTROS (ABOUT)
   ========================================================================== */
.page-title-banner {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #ffffff;
    padding: 60px 0;
    text-align: center;
}

.page-main-title {
    font-family: var(--font-title);
    font-size: 2.6rem;
    font-weight: 700;
}

.nosotros-intro-section {
    padding: 80px 0;
    background-color: #ffffff;
}

.nosotros-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 60px;
    align-items: center;
}

.nosotros-image-wrapper {
    position: relative;
}

.nosotros-img {
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    border: 8px solid #ffffff;
}

.nosotros-label {
    display: inline-block;
    color: var(--accent-color);
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.nosotros-title {
    font-family: var(--font-title);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 24px;
    line-height: 1.25;
}

.nosotros-paragraph {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.7;
}

.nosotros-actions {
    margin-top: 32px;
}

/* Quick links styling */
.nosotros-quick-links {
    background-color: var(--bg-main);
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.quick-link-card {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition-all);
    box-shadow: var(--shadow-sm);
}

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

.card-num {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent-color);
}

.card-name {
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--primary-color);
}

.quick-link-card svg {
    color: var(--text-light);
    transition: var(--transition-fast);
}

.quick-link-card:hover svg {
    color: var(--accent-color);
    transform: translateX(3px);
}

/* Details Blocks (Mission, Vision, Values) */
.nosotros-details-section {
    padding: 80px 0;
    background-color: #ffffff;
}

.details-wrapper {
    display: flex;
    flex-direction: column;
    gap: 80px;
}

.detail-block {
    scroll-margin-top: 110px; /* Ensures header does not block target on jump links */
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.detail-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--accent-soft);
    color: var(--accent-color);
    width: 48px;
    height: 48px;
    border-radius: 10px;
}

.detail-title {
    font-family: var(--font-title);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.detail-text {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.75;
    max-width: 900px;
}

/* Values Grid */
.valores-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.valor-item {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    transition: var(--transition-all);
}

.valor-item:hover {
    background-color: #ffffff;
    border-color: var(--accent-color);
    box-shadow: var(--shadow-md);
}

.valor-item strong {
    font-family: var(--font-title);
    font-size: 1.15rem;
    color: var(--primary-color);
    display: block;
    margin-bottom: 8px;
}

.valor-item span {
    font-size: 0.95rem;
    color: var(--text-muted);
    display: block;
    line-height: 1.6;
}

/* ==========================================================================
   VIEW: CONTACTO (CONTACT)
   ========================================================================== */
.contacto-section {
    padding: 80px 0;
}

.contacto-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 60px;
    align-items: start;
}

.contacto-sub {
    font-family: var(--font-title);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.contacto-intro {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.6;
}

.info-cards-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-all);
}

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

.card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    flex-shrink: 0;
}

.whatsapp-bg {
    background-color: rgba(37, 211, 102, 0.1);
    color: #25D366;
}

.email-bg {
    background-color: rgba(74, 95, 224, 0.1);
    color: var(--accent-color);
}

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

.location-card {
    align-items: flex-start;
}

.card-details {
    display: flex;
    flex-direction: column;
}

.card-label {
    font-family: var(--font-title);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-value {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary-color);
    word-break: break-word;
}

/* Contact Form Card */
.form-card {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.form-title {
    font-family: var(--font-title);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.form-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.form-group label {
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-group label .req {
    color: #ef4444;
}

.form-group input,
.form-group textarea {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    background-color: #ffffff;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-group textarea {
    resize: vertical;
}

.error-msg {
    color: #ef4444;
    font-size: 0.8rem;
    font-weight: 500;
    height: 16px;
}

/* Turnstile Widget Styling */
.turnstile-container {
    margin-top: 10px;
    margin-bottom: 24px;
}

/* Submit loading spinner inside button */
.loader-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Form Status Boxes */
.form-status-box {
    display: flex;
    gap: 16px;
    padding: 20px;
    border-radius: 12px;
    margin-top: 24px;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.success-box {
    background-color: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #15803d;
}

.success-box .status-icon {
    color: #22c55e;
}

.error-box {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #b91c1c;
}

.error-box .status-icon {
    color: #ef4444;
}

.status-icon {
    flex-shrink: 0;
}

.status-text h4 {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.status-text p {
    font-size: 0.9rem;
    line-height: 1.4;
}

/* ==========================================================================
   VIEW: POLITICA DE PRIVACIDAD (PRIVACY POLICY)
   ========================================================================== */
.legal-page-section {
    padding: 60px 0 80px;
}

.legal-content-card {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 48px;
    box-shadow: var(--shadow-sm);
    max-width: 900px;
    margin: 0 auto;
}

.legal-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 24px;
    font-weight: 500;
    text-transform: uppercase;
}

.legal-heading {
    font-family: var(--font-title);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 32px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.legal-heading:first-of-type {
    margin-top: 0;
}

.legal-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.7;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.main-footer {
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 80px 0 0;
    margin-top: 100px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1.3fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-title {
    font-family: var(--font-title);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 10px;
}

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

.footer-contact-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-contact-list li {
    display: flex;
    gap: 12px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.75);
}

.footer-contact-list li svg {
    color: var(--accent-color);
}

.footer-contact-list li a {
    color: rgba(255, 255, 255, 0.75);
    transition: var(--transition-fast);
}

.footer-contact-list li a:hover {
    color: #ffffff;
}

.footer-address {
    line-height: 1.4;
}

.footer-about-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.75);
}

.footer-links-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-link {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.footer-link:hover {
    color: #ffffff;
    transform: translateX(4px);
}

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

.footer-bottom p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   BACK TO TOP BUTTON
   ========================================================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--accent-color);
    color: #ffffff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 99;
    transition: var(--transition-all);
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.back-to-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(20, 38, 140, 0.3);
}

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

/* Tablet & Mobile (Max width: 992px) */
@media (max-width: 992px) {
    .brand-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .nosotros-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contacto-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

/* Mobile (Max width: 768px) */
@media (max-width: 768px) {
    :root {
        --header-height-large: 70px;
    }
    
    .hero-title {
        font-size: 2.4rem;
    }
    
    .hero-subtitle {
        font-size: 1.05rem;
    }
    
    .desktop-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .commitment-features {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .quick-links-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .valores-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .form-row-2 {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .form-card {
        padding: 24px;
    }
    
    .legal-content-card {
        padding: 24px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* Small Devices (Max width: 480px) */
@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .btn {
        padding: 12px 20px;
    }
}
