/* Reset y configuraciones generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a3a5f;
    --secondary-color: #2c5aa0;
    --accent-color: #4a7bc8;
    --light-color: #f8f9fa;
    --dark-color: #333;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --error-color: #dc3545;
    --text-color: #444;
    --text-light: #6c757d;
    --border-color: #e9ecef;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

h1 {
    font-size: 2.5rem;
    line-height: 1.2;
}

h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
}

.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
    text-align: center;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    color: white;
}

.btn-nav {
    background: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    padding: 8px 20px;
}

.btn-nav:hover {
    background: var(--secondary-color);
    color: white;
}

.highlight {
    color: var(--accent-color);
}

/* Header */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo-container {
    display: flex;
    flex-direction: column;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo-icon {
    font-size: 2rem;
    margin-right: 10px;
}

.tagline {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: -5px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

nav a {
    font-weight: 500;
    color: var(--dark-color);
}

nav a:hover {
    color: var(--secondary-color);
}

/* Hero Section - Versión Mejorada */
.hero {
    padding: 100px 0 80px;
    background: linear-gradient(135deg, #f5f9ff 0%, #e8efff 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000" opacity="0.03"><polygon fill="%231a3a5f" points="0,1000 1000,0 1000,1000"/></svg>');
    background-size: cover;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    position: relative;
    z-index: 2;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.3rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    color: var(--text-color);
    font-weight: 400;
    position: relative;
    padding-left: 20px;
    border-left: 4px solid var(--accent-color);
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-bottom: 3rem;
    padding: 20px 0;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.stat::after {
    content: '';
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, var(--accent-color), transparent);
}

.stat:last-child::after {
    display: none;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1;
    margin-bottom: 5px;
    font-family: 'Playfair Display', serif;
}

.stat-text {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-cta {
    display: flex;
    gap: 20px;
    align-items: center;
}

.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: white;
    padding: 16px 35px;
    border-radius: 50px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(44, 90, 160, 0.3);
    text-align: center;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(44, 90, 160, 0.4);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--secondary-color);
    font-weight: 600;
    padding: 16px 25px;
    border: 2px solid var(--secondary-color);
    border-radius: 50px;
    transition: all 0.3s ease;
    background: transparent;
}

.btn-secondary:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
}

.hero-image {
    flex: 1;
    position: relative;
    height: 500px;
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-card {
    position: absolute;
    background: white;
    padding: 30px 25px;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    width: 240px;
    text-align: center;
    transition: all 0.4s ease;
    border: 1px solid rgba(74, 123, 200, 0.15);
    backdrop-filter: blur(10px);
    z-index: 1;
}

.floating-card:hover {
    transform: translateY(-15px) scale(1.05);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

/* Posicionamiento mejorado de las tarjetas */
.floating-card:nth-child(1) {
    top: 15%;
    left: 5%;
    animation: float 4s ease-in-out infinite;
}

.floating-card:nth-child(2) {
    top: 15%;
    right: 5%;
    animation: float 4s ease-in-out infinite 1.5s;
}

.floating-card:nth-child(3) {
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%); /* Centrado fijo */
    animation: none; /* SIN animación para evitar movimiento */
}

.floating-card:nth-child(3):hover {
    transform: translateX(-50%) translateY(-10px) scale(1.05); /* Mantener centrado en hover */
}

.card-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
    display: block;
    filter: grayscale(0.3);
    transition: filter 0.3s ease;
}

.floating-card:hover .card-icon {
    filter: grayscale(0);
}

.floating-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--primary-color);
    font-weight: 600;
}

.floating-card p {
    font-size: 1rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.5;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0); 
    }
    50% { 
        transform: translateY(-10px); 
    }
}

/* Para la tarjeta centrada */
.floating-card:nth-child(3) {
    transform: translateX(-50%);
}

.floating-card:nth-child(3):hover {
    transform: translateX(-50%) translateY(-15px) scale(1.05);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .floating-card:nth-child(1) {
        left: 5%;
    }
    
    .floating-card:nth-child(2) {
        right: 5%;
    }
    
    .floating-card {
        width: 220px;
    }
}

@media (max-width: 992px) {
    .hero-image {
        height: auto;
        min-height: 300px;
        display: flex;
        flex-direction: column;
        gap: 25px;
        margin-top: 40px;
    }
    
    .floating-card {
        position: relative;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        animation: none !important;
        transform: none !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
    }
    
    .floating-card:nth-child(3) {
        transform: none !important;
    }
    
    .floating-card:hover {
        transform: translateY(-8px) scale(1.03) !important;
    }
}

@media (max-width: 576px) {
    .hero-image {
        gap: 20px;
    }
    
    .floating-card {
        padding: 25px 20px;
        max-width: 100%;
    }
}

/* Services Section */
.services {
    padding: 80px 0;
    background-color: white;
}

.section-description {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
    color: var(--text-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-top: 4px solid var(--secondary-color);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.service-card p {
    margin-bottom: 20px;
    color: var(--text-light);
}

.service-card ul {
    list-style: none;
    padding-left: 0;
}

.service-card li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
}

.service-card li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* How It Works */
.how-it-works {
    padding: 80px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.step {
    text-align: center;
    padding: 30px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.step:hover {
    transform: translateY(-5px);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--secondary-color);
    color: white;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.step h3 {
    margin-bottom: 15px;
}

.step p {
    color: var(--text-light);
}

/* Contact Form */
.contact-form-section {
    padding: 80px 0;
    background-color: white;
}

.form-container {
    max-width: 700px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.form-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 30px;
    text-align: center;
}

.form-header h2 {
    color: white;
    margin-bottom: 10px;
}

.form-header p {
    margin-bottom: 0;
    opacity: 0.9;
}

.legal-form {
    padding: 40px;
}

.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
}

input, select, textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(74, 123, 200, 0.2);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.checkbox-group input {
    width: auto;
    margin-top: 5px;
}

.checkbox-group label {
    margin-bottom: 0;
    font-weight: normal;
}

.btn-submit {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    margin-top: 10px;
}

.form-message {
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
    text-align: center;
    display: none;
}

.form-message.success {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
    border: 1px solid var(--success-color);
    display: block;
}

.form-message.error {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--error-color);
    border: 1px solid var(--error-color);
    display: block;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    flex: 1;
    min-width: 300px;
}

.footer-logo .logo {
    color: white;
    margin-bottom: 10px;
}

.footer-logo .tagline {
    color: rgba(255, 255, 255, 0.7);
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    margin-top: 15px;
}

.footer-links {
    flex: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-column {
    flex: 1;
    min-width: 150px;
}

.footer-column h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 10px;
}

.footer-column a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-column a:hover {
    color: white;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-right-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 992px) {
    .hero .container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-image {
        width: 100%;
        height: 300px;
    }
    
    .floating-card {
        position: relative;
        margin: 0 auto 20px;
    }
    
    .floating-card:nth-child(1),
    .floating-card:nth-child(2),
    .floating-card:nth-child(3) {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        bottom: auto;
        transform: none;
        animation: none;
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.7rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }
    
    .legal-form {
        padding: 30px 20px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .steps {
        grid-template-columns: 1fr;
    }
}

/* Estilos para Autenticación */
.btn-login {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.user-menu {
    position: relative;
}

.user-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.user-btn:hover {
    border-color: #667eea;
    background: white;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    min-width: 200px;
    display: none;
    z-index: 1000;
}

.user-menu:hover .user-dropdown {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    color: #333;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background 0.3s ease;
}

.dropdown-item:hover {
    background: #f8f9fa;
}

.dropdown-item.logout {
    color: #dc3545;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: #333;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.modal-body {
    padding: 20px;
}

/* Tabs de Autenticación */
.auth-tabs {
    display: flex;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn.active {
    border-bottom-color: #667eea;
    color: #667eea;
    font-weight: 600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.btn-full {
    width: 100%;
    padding: 12px;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
}

.auth-link {
    color: #667eea;
    text-decoration: none;
}

/* Área de Cliente */
.client-area {
    background: #f8f9fa;
    padding: 80px 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.dashboard-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
}

.dashboard-card .card-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.dashboard-card h3 {
    color: #333;
    margin-bottom: 15px;
}

.dashboard-card p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .user-btn span:not(.user-avatar) {
        display: none;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 20px;
        width: calc(100% - 40px);
    }
}