/* Diseño renovado - Para Inmigrante */
/* Fuente cargada de forma asíncrona para mejorar rendimiento */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --primary-color: #4e7df2;
    --primary-dark: #3849c7;
    --secondary-color: #0f172a;
    --accent-color: #f97316;
    --success-color: #22c55e;
    --danger-color: #ef4444;
    --warning-color: #facc15;
    --light-color: #f8fafc;
    --dark-color: #0f172a;
    --gray-100: #f1f5f9;
    --gray-300: #cbd5f5;
    --gray-500: #64748b;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--secondary-color);
    line-height: 1.6;
    background: var(--light-color);
    min-height: 100vh;
}

section {
    padding: 60px 0;
}

.navbar {
    backdrop-filter: blur(14px);
    background: rgba(15, 23, 42, 0.8) !important;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.2);
    z-index: 1050 !important;
    position: relative;
    padding: 0.25rem 0;
    min-height: auto;
}

.navbar .container {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.navbar-brand {
    font-size: 1.65rem;
    font-weight: 700;
    color: #fff !important;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    padding: 0;
    margin: 0;
    height: auto;
    min-height: auto;
}

.navbar-logo {
    height: 145px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    transition: transform 0.3s ease;
    margin: 0;
    padding: 0;
}

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

.navbar-brand-text {
    font-size: 1.65rem;
    font-weight: 700;
    color: #fff !important;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
}

/* Colores de España - Decoraciones sutiles */
:root {
    --spain-red: #AA151B;
    --spain-yellow: #F1BF00;
}

/* Línea decorativa superior en hero */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--spain-red) 0%, var(--spain-yellow) 50%, var(--spain-red) 100%);
    z-index: 1;
    opacity: 0.6;
}

/* Borde superior sutil en tarjetas de servicio */
.service-card {
    position: relative;
    border-top: 2px solid transparent;
    transition: all 0.3s ease;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--spain-red) 0%, var(--spain-yellow) 100%);
    border-radius: 18px 18px 0 0;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.service-card:hover::before {
    opacity: 0.8;
}

/* Línea decorativa bajo títulos de sección */
.section-title {
    position: relative;
    display: inline-block;
    padding-bottom: 12px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, var(--spain-red) 0%, var(--spain-yellow) 100%);
    border-radius: 2px;
    opacity: 0.7;
}

/* Punto decorativo sutil en tarjetas */
.card {
    position: relative;
}

.card::after {
    content: '';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 6px;
    height: 6px;
    background: linear-gradient(135deg, var(--spain-red) 0%, var(--spain-yellow) 100%);
    border-radius: 50%;
    opacity: 0.3;
}

/* Línea decorativa en navbar */
.navbar {
    position: relative;
}

.navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--spain-red) 0%, var(--spain-yellow) 50%, var(--spain-red) 100%);
    opacity: 0.4;
}

/* Efecto sutil en botones primarios */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(170, 21, 27, 0.15), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

/* Acento sutil en primera letra de títulos principales */
h1, h2 {
    position: relative;
}

h1::first-letter,
h2::first-letter {
    background: linear-gradient(135deg, var(--spain-red) 0%, var(--spain-yellow) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.8;
}

/* Línea decorativa en footer */
footer {
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--spain-red) 0%, var(--spain-yellow) 50%, var(--spain-red) 100%);
    opacity: 0.5;
}

/* Fondo sutil en secciones alternas */
section:nth-child(even) {
    background: linear-gradient(135deg, rgba(170, 21, 27, 0.02) 0%, rgba(241, 191, 0, 0.02) 100%);
}

/* Borde izquierdo sutil en post cards */
.post-card {
    position: relative;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.post-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--spain-red) 0%, var(--spain-yellow) 100%);
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.post-card:hover::before {
    opacity: 0.6;
}

/* Badge sutil con colores de España */
.category-badge {
    position: relative;
}

.category-badge::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 1px;
    background: linear-gradient(90deg, var(--spain-red) 0%, var(--spain-yellow) 100%);
    opacity: 0.5;
}

/* Acento en dropdown items */
.dropdown-item:hover {
    background: linear-gradient(90deg, rgba(170, 21, 27, 0.05) 0%, rgba(241, 191, 0, 0.05) 100%);
    border-left: 2px solid var(--spain-red);
}

/* Línea decorativa en phone banner */
.phone-banner {
    position: relative;
}

.phone-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--spain-red) 0%, var(--spain-yellow) 50%, var(--spain-red) 100%);
    opacity: 0.5;
}

/* Acento sutil en iconos de servicios */
.service-card i {
    position: relative;
}

.service-card i::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 1px;
    background: linear-gradient(90deg, var(--spain-red) 0%, var(--spain-yellow) 100%);
    opacity: 0.4;
}

/* Fondo muy sutil en cards al hover */
.card:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.98) 100%);
    box-shadow: 0 20px 45px rgba(15,23,42,0.12), 0 0 0 1px rgba(170, 21, 27, 0.1);
}

@media (max-width: 768px) {
    .navbar-logo {
        height: 100px;
        max-width: 150px;
    }
    
    .navbar {
        padding: 0.2rem 0;
    }
    
    .navbar .container {
        padding-top: 0.3rem;
        padding-bottom: 0.3rem;
    }
    
    .navbar-brand {
        padding: 0;
    }
}

.navbar-nav {
    align-items: center;
}

.navbar-nav .nav-link {
    color: rgba(255,255,255,0.8) !important;
    font-weight: 500;
    margin: 0 3px;
    padding: 0.4rem 0.6rem !important;
    font-size: 0.95rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
    color: #fff !important;
}

.hero-section {
    background: radial-gradient(circle at top, rgba(78,125,242,0.25), transparent),
                linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    color: white;
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url('https://www.transparenttextures.com/patterns/cubes.png');
    opacity: 0.15;
    pointer-events: none;
}

.hero-section h1 {
    font-size: clamp(2.3rem, 5vw, 3.4rem);
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-section p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255,255,255,0.85);
}

.hero-cta .btn {
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: 0;
    box-shadow: 0 15px 25px rgba(78,125,242,0.35);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 35px rgba(78,125,242,0.45);
}

.btn-outline-light {
    border-width: 2px;
    color: #fff;
}

.stats-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(248, 250, 252, 0.15);
    border-radius: 50px;
    padding: 12px 20px;
    font-size: 0.95rem;
    color: #fff;
    margin-bottom: 20px;
}

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

.section-title h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.section-title p {
    color: var(--gray-500);
    max-width: 600px;
    margin: 0 auto;
}

.card {
    border: none;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(15,23,42,0.08);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    background: #fff;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 45px rgba(15,23,42,0.12);
}

.service-card {
    text-align: center;
    padding: 35px 25px;
}

.service-card i {
    width: 70px;
    height: 70px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(78,125,242,0.1);
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 20px;
}

.category-badge {
    background: rgba(78,125,242,0.12);
    color: var(--primary-color);
    border-radius: 30px;
    padding: 6px 18px;
    font-weight: 500;
    font-size: 0.85rem;
}

.post-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 18px 18px 0 0;
}

.contact-form {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 40px rgba(15,23,42,0.15);
}

.contact-info {
    background: var(--secondary-color);
    color: #fff;
    border-radius: 20px;
    padding: 40px;
    height: 100%;
}

.contact-info h3 {
    margin-bottom: 25px;
    font-weight: 700;
}

.contact-info a {
    color: #fff;
    text-decoration: none;
}

.phone-banner {
    background: transparent !important;
    color: #fff;
    padding: 0 !important;
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.5px;
    z-index: 1020 !important;
    position: relative;
}

.phone-banner a {
    color: inherit;
    text-decoration: none;
}

.pill-list li {
    margin: 8px 0;
    font-weight: 500;
}

footer {
    background: #0f172a;
    color: rgba(255,255,255,0.75);
}

footer a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
}

footer a:hover {
    color: #fff;
}

/* Responsive */
@media (max-width: 992px) {
    .hero-section {
        text-align: center;
    }
    .hero-cta {
        justify-content: center;
    }
}

/* Service Cards */
.service-card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card-hover:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15) !important;
}

.service-icon-wrapper {
    display: inline-block;
    padding: 20px;
    background: linear-gradient(135deg, rgba(78, 125, 242, 0.1), rgba(118, 53, 245, 0.1));
    border-radius: 50%;
    margin-bottom: 15px;
}

/* Process Steps */
.process-step {
    padding: 20px;
}

.step-number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4e7df2, #7635f5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 15px;
}

/* Legal Content */
.legal-content {
    line-height: 1.8;
}

.legal-content h2 {
    color: #333;
    margin-top: 2rem;
}

.legal-content ul {
    padding-left: 1.5rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
}

/* Footer Improvements */
footer .social-links a {
    transition: transform 0.3s ease, color 0.3s ease;
}

footer .social-links a:hover {
    transform: translateY(-3px);
    color: #fff !important;
}

footer a.text-white-50:hover {
    color: #fff !important;
    text-decoration: underline;
}

/* Help Section - Diseño unificado con iconos */
.bg-light.rounded.border {
    transition: all 0.3s ease;
}

.bg-light.rounded.border:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.bg-light.rounded.border .btn {
    transition: all 0.3s ease;
    font-weight: 500;
}

.bg-light.rounded.border .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.bg-light.rounded.border .btn i {
    transition: transform 0.3s ease;
}

.bg-light.rounded.border .btn:hover i {
    transform: scale(1.1);
}

/* Opiniones - Estilos */
.opinion-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.opinion-card:hover {
    transform: translateY(-5px);
}

.opinion-card .card {
    transition: all 0.3s ease;
}

.opinion-card:hover .card {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Phone Display Box - Cuando está dentro del banner */
.phone-banner .phone-display-box {
    margin: 0 !important;
    border-radius: 0 !important;
    width: 100% !important;
    padding: 25px 30px !important;
}

.phone-display-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    border-radius: 20px;
    padding: 30px 35px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4), 0 5px 15px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    position: relative;
    overflow: hidden;
}

.phone-display-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.phone-display-box:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.5), 0 10px 25px rgba(0, 0, 0, 0.15);
}

.phone-display-box .phone-link {
    text-decoration: none;
    color: white;
    display: block;
    position: relative;
    z-index: 1;
}

.phone-display-box .phone-number {
    font-size: 2.2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

.phone-display-box .phone-number i {
    font-size: 2.8rem;
    animation: phonePulse 2s ease-in-out infinite;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

@keyframes phonePulse {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.15) rotate(-5deg);
    }
    50% {
        transform: scale(1.1) rotate(0deg);
    }
    75% {
        transform: scale(1.15) rotate(5deg);
    }
}

.phone-display-box .phone-cost-text {
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.75rem;
    margin: 0;
    line-height: 1.4;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    font-weight: 400;
}

/* Dropdown menu improvements */
.navbar {
    z-index: 1050 !important;
    position: relative;
}

.dropdown-menu {
    border: none !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2), 0 5px 15px rgba(0, 0, 0, 0.1) !important;
    border-radius: 12px !important;
    padding: 12px 0 !important;
    margin-top: 8px !important;
    z-index: 1055 !important; /* Por encima de todo */
    position: absolute !important;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px);
    min-width: 220px;
}

.navbar-nav .dropdown-menu {
    z-index: 1055 !important;
}

.dropdown-item {
    padding: 12px 24px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 8px !important;
    margin: 3px 8px !important;
    font-weight: 500;
    color: #333 !important;
    position: relative;
    overflow: hidden;
}

.dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #4e7df2 0%, #7635f5 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, #4e7df2 0%, #7635f5 100%) !important;
    color: white !important;
    transform: translateX(8px);
    box-shadow: 0 4px 12px rgba(78, 125, 242, 0.4);
    padding-left: 28px !important;
}

.dropdown-item:hover::before {
    transform: scaleY(1);
}

.dropdown-item i {
    margin-right: 8px;
    font-size: 1.1rem;
}

.dropdown-divider {
    margin: 10px 0 !important;
    opacity: 0.2;
}

.dropdown-toggle::after {
    margin-left: 8px;
    vertical-align: 0.2em;
}


/* Page Loader */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    color: white;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loader-text {
    font-size: 1.2rem;
    font-weight: 500;
    margin-top: 15px;
    animation: pulse-text 1.5s ease-in-out infinite;
}

@keyframes pulse-text {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.loader-logo {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .phone-display-box {
        padding: 25px 20px;
    }
    
    .phone-display-box .phone-number {
        font-size: 1.8rem;
    }
    
    .phone-display-box .phone-number i {
        font-size: 2.3rem;
    }
    
    .phone-display-box .phone-cost-text {
        font-size: 0.8rem;
    }
    
    .contact-form, .contact-info {
        padding: 25px;
    }
    section {
        padding: 40px 0;
    }
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .loader-spinner {
        width: 50px;
        height: 50px;
        border-width: 4px;
    }
    
    .loader-text {
        font-size: 1rem;
    }
}

