/* 
   ALVA3 Asesores en Seguros - Design System
   MAPFRE Corporate Inspired
*/

:root {
    --mapfre-red: #E30613;
    --white: #FFFFFF;
    --bg-light: #F5F5F5;
    --text-dark: #333333;
    --text-muted: #666666;
    --accent-red-hover: #c40510;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-premium: 0 10px 40px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --nav-height: 80px;
    --container-width: 1200px;
    --transition-smooth: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
    transition: var(--transition-smooth);
}

h1, h2, h3, h4, .brand-text {
    font-family: 'Outfit', sans-serif;
    line-height: 1.2;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    display: block;
}

/* Utility Classes */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 100px 0;
}

.bg-white { background-color: var(--white); }
.bg-light { background-color: var(--bg-light); }
.bg-dark { background-color: var(--text-dark); }
.bg-mapfre { background-color: var(--mapfre-red); }
.text-white { color: var(--white); }
.text-mapfre { color: var(--mapfre-red); }
.text-center { text-align: center; }
.mb-30 { margin-bottom: 30px; }
.mb-60 { margin-bottom: 60px; }
.mt-30 { margin-top: 30px; }
.rounded-xl { border-radius: 24px; }
.shadow-premium { box-shadow: var(--shadow-premium); }
.shadow-soft { box-shadow: var(--shadow-soft); }

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
}

.btn-primary {
    background-color: var(--mapfre-red);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--accent-red-hover);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(227, 6, 19, 0.3);
}

.btn-outline {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--mapfre-red);
    transform: translateY(-3px);
}

.btn-large {
    padding: 16px 40px;
    font-size: 1.1rem;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--mapfre-red);
    font-weight: 600;
    margin-top: 15px;
}

.btn-link i {
    transition: transform 0.3s ease;
}

.btn-link:hover i {
    transform: translateX(5px);
}

/* Navbar */
.navbar {
    height: var(--nav-height);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    height: 70px;
    box-shadow: var(--shadow-soft);
}

.container-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--white);
}

.navbar.scrolled .logo {
    color: var(--mapfre-red);
}

.brand-text small {
    font-size: 0.6em;
    font-weight: 400;
    background: var(--mapfre-red);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    vertical-align: middle;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    color: var(--white);
    font-weight: 500;
    font-size: 0.95rem;
}

.navbar.scrolled .nav-links a {
    color: var(--text-dark);
}

.navbar.scrolled .nav-links a.btn-primary {
    color: var(--white);
}

/* Hero Section */
.hero {
    height: 100vh;
    background: url('hero-bg.png') center/cover no-repeat;
    display: flex;
    align-items: center;
    position: relative;
    color: var(--white);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 24px;
    font-weight: 800;
    animation: slideUp 1s ease forwards;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 40px;
    opacity: 0.9;
    animation: slideUp 1s ease 0.2s forwards;
    animation-fill-mode: both;
}

.hero-btns {
    display: flex;
    gap: 20px;
    animation: slideUp 1s ease 0.4s forwards;
    animation-fill-mode: both;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Section Common */
.section-tag {
    display: inline-block;
    color: var(--mapfre-red);
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.section-subtitle {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* History Section */
.section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.image-wrapper img {
    width: 100%;
    height: auto;
    border-radius: 24px;
}

/* Values */
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.value-card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    text-align: center;
    transition: transform 0.3s ease;
}

.value-card:hover {
    transform: translateY(-10px);
}

.value-icon {
    font-size: 2.5rem;
    color: var(--mapfre-red);
    margin-bottom: 20px;
}

/* Products */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid #eee;
    transition: all 0.3s ease;
}

.product-card:hover {
    border-color: var(--mapfre-red);
    box-shadow: var(--shadow-soft);
    transform: translateY(-5px);
}

.product-icon {
    font-size: 2rem;
    color: var(--mapfre-red);
    margin-bottom: 20px;
    width: 60px;
    height: 60px;
    background: rgba(227, 6, 19, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.relevant-details {
    margin-top: 88px;
    padding-top: 56px;
    border-top: 1px solid rgba(51, 51, 51, 0.08);
}

.relevant-details-header {
    max-width: 680px;
    margin: 0 auto 36px;
}

.relevant-details-title {
    font-size: 1.9rem;
    margin-bottom: 0;
}

.relevant-details-grid {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Testimonials */
.testimonials-section {
    position: relative;
    background:
        radial-gradient(circle at 20% 20%, rgba(227, 6, 19, 0.08), transparent 20%),
        radial-gradient(circle at 82% 18%, rgba(0, 0, 0, 0.05), transparent 18%),
        linear-gradient(180deg, #f2f2f2 0%, #e8e8e8 100%);
    overflow: hidden;
}

.testimonials-ribbon {
    position: absolute;
    top: 0;
    left: 0;
    width: 120px;
    height: 160px;
    background: var(--mapfre-red);
    clip-path: polygon(0 0, 68% 0, 0 100%);
}

.testimonials-section .container {
    position: relative;
}

.testimonials-orbit {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(1px);
}

.testimonials-orbit-one {
    width: 240px;
    height: 240px;
    right: -40px;
    top: 110px;
    border: 1px solid rgba(227, 6, 19, 0.14);
}

.testimonials-orbit-two {
    width: 110px;
    height: 110px;
    left: 100px;
    bottom: 30px;
    background: rgba(255, 255, 255, 0.45);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.03);
}

.testimonials-heading {
    position: relative;
    margin-bottom: 56px;
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
}

.testimonials-title {
    font-size: 4rem;
    line-height: 0.95;
    text-transform: uppercase;
    letter-spacing: -0.04em;
    margin-bottom: 18px;
}

.testimonials-intro {
    max-width: 720px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.8;
    color: rgba(51, 51, 51, 0.8);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    align-items: end;
    position: relative;
    z-index: 1;
}

.testimonial-card {
    --card-shift: 26px;
    --card-tilt: -1.2deg;
    position: relative;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(242, 242, 242, 0.96) 100%);
    border-radius: 22px;
    overflow: hidden;
    min-height: 430px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid rgba(255, 255, 255, 0.65);
    transform: translateY(var(--card-shift)) rotate(var(--card-tilt));
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    box-shadow: 0 28px 50px rgba(0, 0, 0, 0.08);
}

.testimonial-card:hover {
    transform: translateY(calc(var(--card-shift) - 14px)) rotate(var(--card-tilt));
    box-shadow: 0 34px 60px rgba(0, 0, 0, 0.14);
    border-color: rgba(227, 6, 19, 0.18);
}

.testimonial-card-left {
    --card-shift: 34px;
    --card-tilt: -1.4deg;
}

.testimonial-card-right {
    --card-shift: 38px;
    --card-tilt: 1.4deg;
}

.testimonial-card-featured {
    --card-shift: -12px;
    --card-tilt: 0.4deg;
}

.testimonial-card-featured .testimonial-copy {
    background: linear-gradient(135deg, #ff1320 0%, #d70010 100%);
    color: var(--white);
}

.testimonial-card-featured .testimonial-quote-mark {
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
}

.testimonial-copy {
    position: relative;
    padding: 68px 30px 38px;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: center;
    justify-content: center;
    text-align: left;
}

.testimonial-pill {
    display: inline-flex;
    align-self: flex-start;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    background: rgba(227, 6, 19, 0.08);
    color: var(--mapfre-red);
}

.testimonial-card-featured .testimonial-pill {
    background: rgba(255, 255, 255, 0.14);
    color: var(--white);
}

.testimonial-copy p {
    font-size: 0.98rem;
    line-height: 1.8;
    color: inherit;
    margin: 0;
}

.testimonial-quote-mark {
    position: absolute;
    top: 18px;
    left: 22px;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--mapfre-red);
    opacity: 0.95;
    z-index: 2;
    background: rgba(227, 6, 19, 0.08);
}

.testimonial-author {
    position: relative;
    background: rgba(255, 255, 255, 0.9);
    padding: 60px 24px 28px;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.testimonial-card-featured .testimonial-author {
    border-top-color: rgba(227, 6, 19, 0.12);
}

.testimonial-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(180deg, #d8d8d8 0%, #bdbdbd 100%);
    color: transparent;
    margin: 0 auto;
    position: absolute;
    top: -32px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.testimonial-card-featured .testimonial-avatar {
    background: linear-gradient(180deg, #d0d0d0 0%, #b3b3b3 100%);
}

.testimonial-avatar::before,
.testimonial-avatar::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: #efefef;
}

.testimonial-avatar::before {
    top: 11px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
}

.testimonial-avatar::after {
    top: 28px;
    width: 34px;
    height: 18px;
    border-radius: 18px 18px 10px 10px;
}

.testimonial-stars {
    color: #d7a30f;
    letter-spacing: 2px;
    font-size: 1rem;
    margin-bottom: 10px;
}

.testimonial-author h3 {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 4px;
    letter-spacing: 0.03em;
}

.testimonial-author p {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@keyframes floatTestimonial {
    0% {
        transform: translateY(var(--card-shift)) rotate(var(--card-tilt));
    }
    50% {
        transform: translateY(calc(var(--card-shift) - 8px)) rotate(var(--card-tilt));
    }
    100% {
        transform: translateY(var(--card-shift)) rotate(var(--card-tilt));
    }
}

.testimonial-card-left,
.testimonial-card-right {
    animation: floatTestimonial 6s ease-in-out infinite;
}

.testimonial-card-right {
    animation-delay: 1.2s;
}

/* Intermediaries */
.benefit-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.benefit-list i {
    color: var(--mapfre-red);
}

/* Trust Bar */
.trust-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 40px 0;
    gap: 32px;
}

.trust-item {
    text-align: center;
    flex: 1 1 0;
    min-width: 0;
}

.trust-number {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    font-family: 'Outfit';
    line-height: 1;
    margin-bottom: 10px;
}

.trust-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    max-width: 220px;
    margin: 0 auto;
}

.trust-divider {
    width: 1px;
    height: 60px;
    background: rgba(255,255,255,0.3);
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    overflow: hidden;
}

.contact-info {
    padding: 60px;
}

.contact-methods {
    margin-top: 40px;
}

.method {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.method i {
    font-size: 1.5rem;
    color: var(--mapfre-red);
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.method h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.method p {
    opacity: 0.7;
    font-size: 0.9rem;
}

.contact-form-container {
    padding: 60px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--mapfre-red);
    box-shadow: 0 0 0 4px rgba(227, 6, 19, 0.05);
}

/* Footer */
.footer {
    background-color: #1a1a1a;
    color: var(--white);
    padding: 80px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 2fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.footer-brand p {
    color: var(--mapfre-red);
    font-weight: 700;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.2rem;
}

.social-links a:hover {
    background: var(--mapfre-red);
    transform: translateY(-3px);
}

.footer-links h4, .footer-legal h4 {
    font-size: 1.2rem;
    margin-bottom: 25px;
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links a {
    opacity: 0.7;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--mapfre-red);
    padding-left: 5px;
}

.footer-legal p {
    opacity: 0.6;
    font-size: 0.9rem;
    line-height: 1.8;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-bottom p {
    opacity: 0.5;
    font-size: 0.85rem;
}

/* Process Steps */
.process-steps {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

.process-step {
    display: flex;
    align-items: flex-start;
    gap: 28px;
    background: var(--white);
    padding: 32px 36px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease;
}

.process-step:hover {
    transform: translateX(8px);
}

.process-number {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    background: var(--mapfre-red);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
}

.process-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.process-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* FAQ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 0;
    overflow: hidden;
    border: 1px solid #eee;
}

.faq-item summary {
    padding: 22px 28px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--mapfre-red);
    font-weight: 400;
    line-height: 1;
    transition: transform 0.3s ease;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item summary:hover {
    background: rgba(227, 6, 19, 0.03);
}

.faq-item[open] summary {
    border-bottom: 1px solid #eee;
    color: var(--mapfre-red);
}

.faq-item p {
    padding: 20px 28px;
    color: var(--text-muted);
    line-height: 1.7;
}

/* Responsive */
@media (max-width: 992px) {
    .section-grid {
        grid-template-columns: 1fr;
    }

    .testimonials-title {
        font-size: 3rem;
    }

    .testimonials-intro {
        font-size: 1rem;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
        max-width: 560px;
        margin: 0 auto;
    }
    
    .testimonial-card,
    .testimonial-card:hover,
    .testimonial-card-featured {
        transform: none;
        animation: none;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; /* Mobile menu logic would go here */
    }

    .testimonials-ribbon {
        width: 90px;
        height: 120px;
    }

    .testimonials-heading {
        margin-bottom: 36px;
    }

    .testimonials-title {
        font-size: 2.4rem;
    }

    .testimonials-intro {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .testimonial-card {
        min-height: auto;
    }

    .testimonial-copy {
        min-height: auto;
        padding: 62px 24px 34px;
    }

    .testimonial-author {
        padding: 54px 20px 24px;
    }

    .testimonials-orbit-one {
        width: 160px;
        height: 160px;
        right: -50px;
        top: 140px;
    }

    .testimonials-orbit-two {
        display: none;
    }

    .relevant-details {
        margin-top: 64px;
        padding-top: 42px;
    }

    .relevant-details-title {
        font-size: 1.6rem;
    }
    
    .trust-container {
        flex-direction: column;
        gap: 30px;
        padding: 20px 0;
    }

    .trust-number {
        font-size: 2.5rem;
    }
    
    .trust-divider {
        display: none;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .section {
        padding: 60px 0;
    }
}
