/* Base Styles */
:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-color: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #475569;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}

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

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

ul {
    list-style: none;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    color: white;
}

.btn-block {
    width: 100%;
}

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

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

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

.logo img {
    height: 40px;
    width: 40px;
    border-radius: 8px;
    object-fit: cover;
}

.nav-links {
    display: none;
    gap: 32px;
}

.nav-links a {
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
}

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

.mobile-menu-btn {
    display: block;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 8px;
}

.mobile-nav {
    display: none;
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    padding: 16px 24px;
}

.mobile-nav.active {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-link {
    color: var(--text-main);
    font-weight: 500;
    font-size: 1.1rem;
    padding: 8px 0;
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
    .mobile-menu-btn {
        display: none;
    }
    .mobile-nav {
        display: none !important;
    }
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 72px; /* navbar height */
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.9));
    z-index: -1;
}

.hero-content {
    color: white;
    max-width: 800px;
    padding: 0 24px;
    animation: fadeInUp 0.8s ease-out;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero-content p {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    color: #cbd5e1;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

/* Services */
.services {
    padding: 100px 0;
    background-color: var(--bg-color);
}

.section-title {
    text-align: center;
    margin-bottom: 64px;
}

.section-title h2 {
    font-size: 2.25rem;
    margin-bottom: 16px;
}

.section-title p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

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

.service-card {
    background: var(--card-bg);
    padding: 40px 32px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    text-align: center;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 24px;
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Contact */
.contact {
    padding: 100px 0;
    background-color: white;
}

.contact-card {
    background: var(--bg-color);
    border-radius: 24px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

@media (min-width: 992px) {
    .contact-card {
        grid-template-columns: 1fr 1fr;
    }
}

.contact-info {
    padding: 48px;
    background-color: var(--primary);
    color: white;
}

.contact-info h2 {
    font-size: 2rem;
    margin-bottom: 16px;
}

.contact-info > p {
    color: #e0e7ff;
    margin-bottom: 40px;
}

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

.contact-list li {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 1rem;
    color: #e0e7ff;
}

.contact-list li strong {
    color: white;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.contact-list a {
    color: white;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.contact-list a:hover {
    color: #e0e7ff;
}

.contact-form-container {
    padding: 48px;
    background: white;
}

.contact-form-container h3 {
    font-size: 1.5rem;
    margin-bottom: 24px;
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--bg-color);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Footer */
.footer {
    background-color: var(--text-main);
    color: white;
    padding: 48px 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

@media (min-width: 768px) {
    .footer-brand {
        align-items: flex-start;
    }
}

.footer-logo {
    height: 40px;
    width: 40px;
    border-radius: 8px;
}

.footer-brand p {
    color: #94a3b8;
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: #cbd5e1;
    font-size: 0.9rem;
    font-weight: 500;
}

.footer-links a:hover {
    color: white;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -48%) scale(0.96);
    background: white;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    border-radius: var(--border-radius);
    z-index: 2001;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.5rem;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--text-main);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

.modal-body h3 {
    font-size: 1.1rem;
    margin: 20px 0 10px;
    color: var(--text-main);
}

.modal-body h3:first-child {
    margin-top: 0;
}

.modal-body p {
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* Legal Pages */
.legal-content {
    padding: 120px 0 60px; /* espaciado superior extra por navbar fijo */
    min-height: calc(100vh - 200px); /* ocupa el alto excepto footer */
    background-color: var(--bg-color);
}

.legal-content h1 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-align: center;
}

.legal-text {
    background: var(--card-bg);
    padding: 48px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    max-width: 800px;
    margin: 0 auto;
}

.legal-text h3 {
    font-size: 1.25rem;
    margin: 32px 0 16px;
    color: var(--text-main);
}

.legal-text h3:first-child {
    margin-top: 0;
}

.legal-text p {
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.7;
}

.legal-text p:last-child {
    margin-bottom: 0;
}
