/* ============================================
   VARIABLES DE COLOR & DESIGN SYSTEM
   ============================================ */
:root {
    --primary-color: #1a3a52;
    --secondary-color: #6b9080;
    --accent-color: #ffc107;
    --text-color: #333333;
    --light-gray: #f5f5f5;
    --border-color: #e0e0e0;
    --white: #ffffff;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --gradient-overlay: linear-gradient(rgba(26, 58, 82, 0.7), rgba(26, 58, 82, 0.7));
    --box-shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.08);
    --box-shadow-md: 0 12px 30px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s ease;
}

/* ============================================
   RESET Y ESTILOS BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   TIPOGRAFÍA
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

.text-center {
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 3rem;
}

/* ============================================
   UTILIDADES & LAYOUT
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
}

.btn {
    display: inline-block;
    padding: 14px 35px;
    border-radius: 50px;
    /* Modern rounded style */
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(107, 144, 128, 0.3);
}

.btn-primary:hover {
    background-color: #5a7a6f;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(107, 144, 128, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* ============================================
   HEADER & NAVEGACIÓN
   ============================================ */
.site-header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--box-shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.mobile-menu-btn {
    display: none;
    /* Hidden on desktop */
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--primary-color);
    cursor: pointer;
}

.site-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.site-logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-navigation {
    display: flex;
    gap: 2rem;
}

.site-navigation a {
    color: var(--text-color);
    font-weight: 500;
    font-size: 1rem;
    position: relative;
}

.site-navigation a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

.site-navigation a:hover {
    color: var(--secondary-color);
}

.site-navigation a:hover::after {
    width: 100%;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    background: var(--gradient-overlay), url('assets/images/hero-seguros.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--white);
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.hero-content h1 {
    color: var(--white);
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   SERVICIOS SECTION
   ============================================ */
.services-section {
    background-color: var(--light-gray);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.service-card {
    background-color: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--box-shadow-sm);
    transition: var(--transition);
    position: relative;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.service-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    z-index: 1;
    transition: transform 0.5s ease;
}

.service-card:hover .service-card-bg {
    transform: scale(1.05);
}

.service-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(26, 58, 82, 0.4), rgba(26, 58, 82, 0.9));
    z-index: 2;
}

.service-card-content {
    position: relative;
    z-index: 3;
    padding: 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: var(--white);
}

.service-card h3 {
    color: var(--white);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.service-card p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
    height: 0;
    /* Hide by default */
}

.service-card:hover p {
    opacity: 1;
    transform: translateY(0);
    height: auto;
    margin-bottom: 1.5rem;
}

.service-btn {
    align-self: flex-start;
    padding: 8px 20px;
    background-color: var(--secondary-color);
    color: var(--white);
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
    transition-delay: 0.1s;
}

.service-card:hover .service-btn {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   TESTIMONIOS SECTION
   ============================================ */
.testimonials-section {
    background-color: var(--white);
}

.rating-summary {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 50px;
    background: var(--light-gray);
    padding: 20px 40px;
    border-radius: 50px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.rating-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
}

.rating-info p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.stars {
    color: var(--accent-color);
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    transition: var(--transition);
    position: relative;
}

.testimonial-card:hover {
    box-shadow: var(--box-shadow-md);
    transform: translateY(-5px);
    border-color: transparent;
}

.testimonial-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.testimonial-name {
    font-weight: 700;
    color: var(--primary-color);
}

.badge-verified {
    background-color: #d4edda;
    color: #155724;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.testimonial-text {
    font-style: italic;
    color: #555;
    margin-bottom: 15px;
}

.testimonial-meta {
    font-size: 0.85rem;
    color: #999;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-section {
    background-color: var(--light-gray);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--box-shadow-sm);
}

.contact-info {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-info h3 {
    color: var(--white);
    margin-bottom: 20px;
}

.contact-info p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.info-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.email-btn-small {
    display: inline-block;
    margin-top: 5px;
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: var(--white);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.email-btn-small:hover {
    background-color: var(--white);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.contact-form {
    padding: 50px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background-color: #f9f9f9;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
    background-color: var(--white);
    box-shadow: 0 0 0 3px rgba(107, 144, 128, 0.1);
}

.form-submit {
    width: 100%;
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.form-submit:hover {
    background-color: #5a7a6f;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(107, 144, 128, 0.3);
}

/* ============================================
   RUBÉN'S AVATAR & FOOTER
   ============================================ */
.about-section {
    padding: 60px 0;
    background-color: var(--white);
    text-align: center;
}

.avatar-container {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 20px;
    border: 4px solid var(--secondary-color);
    box-shadow: var(--box-shadow-md);
}

.site-footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 50px 0 20px;
    text-align: center;
}

/* ============================================
   WHATSAPP BUTTON
   ============================================ */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.whatsapp-float:hover {
    background-color: #128C7E;
    transform: scale(1.1);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .contact-info {
        padding: 30px;
    }

    .info-item {
        word-break: break-all;
        /* Prevent email from being cut off */
    }

    .mobile-menu-btn {
        display: block;
        /* Show button on mobile */
    }

    .site-navigation {
        display: none;
        /* Hidden by default */
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        text-align: center;
    }

    .site-navigation.active {
        display: flex;
        /* Show when active */
    }

    .site-navigation a {
        display: block;
        padding: 15px 0;
        border-bottom: 1px solid #eee;
    }

    /* Mobile menu simplified for now */

    .service-card p,
    .service-btn {
        opacity: 1;
        transform: translateY(0);
        height: auto;
    }
}

/* ============================================
   FORM VALIDATION & SUCCESS
   ============================================ */
.input-error {
    border: 2px solid #ff4d4d !important;
    background-color: #fff5f5 !important;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.success-message {
    text-align: center;
    padding: 40px 20px;
    background: #f0fff4;
    border-radius: 10px;
    border: 1px solid #c6f6d5;
    animation: fadeIn 0.5s ease-in-out;
}

.success-icon {
    font-size: 3.5rem;
    margin-bottom: 15px;
    animation: scaleUp 0.5s ease-back;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleUp {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}