/* Custom CSS for Avanza Contigo */

/* ===== ROOT VARIABLES ===== */
:root {
    --primary-color: #43a047;      /* Verde principal */
    --accent-color: #81c784;       /* Verde claro acento */
    --bg-light: #ffffff;           /* Fondo de secciones claras */
    --white: #ffffff;              /* Blanco puro */
    --dark: #f1f8f5;               /* Fondo global muy claro verdoso */
    --text-dark: #1a2b25;          /* Texto principal oscuro */
    --text-light: #4b5e57;         /* Texto secundario */
    --font-heading: 'PT Sans Narrow', sans-serif;
    --font-body: 'PT Sans Narrow', sans-serif;
}

/* ===== GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--dark);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

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

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

/* ===== UTILITY CLASSES ===== */
.section-bg {
    background-color: var(--bg-light);
}

.section-header h2 {
    position: relative;
    display: inline-block;
    color: var(--text-dark);
    padding-bottom: 0.4rem;
    margin-bottom: 2rem;
}
.section-header h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60%;
    height: 6px;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.btn-accent {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
    font-family: var(--font-heading);
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-accent:hover {
    background-color: #2e7d32;
    border-color: #2e7d32;
    color: #ffffff;
    transform: translateY(-2px);
}

/* ===== COOKIE BANNER ===== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #e8f5e9;
    color: var(--text-dark);
    padding: 1rem 0;
    z-index: 1050;
    display: none;
    border-top: 1px solid #cde7d2;
}

.cookie-banner.show {
    display: block;
}

.cookie-banner p {
    color: var(--text-dark);
    margin-bottom: 0;
}

.cookie-banner a {
    color: var(--primary-color);
}

/* ===== HEADER ===== */
header {
    background: var(--white);
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    z-index: 1040;
}

/* Glassy navbar */
.navbar-glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-bottom: 1px solid #e2f0e7;
}

/* Underline hover */
.nav-link-underline {
    position: relative;
}
.nav-link-underline::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.25s ease;
}
.nav-link-underline:hover::after {
    width: 100%;
}

.navbar-brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link {
    font-family: var(--font-heading);
    color: rgba(26,43,37,0.8) !important;
    font-weight: 600;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

.navbar-toggler {
    border-color: var(--primary-color);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2067,160,71,1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ===== HERO SECTION ===== */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

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

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.85), rgba(67,160,71,0.12));
    z-index: -1;
    display: flex;
    align-items: center;
}

.hero-title {
    font-size: 3rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

/* Hero side card */
.hero-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,255,255,0.8));
    border: 1px solid #e2f0e7;
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
    color: var(--text-light);
}
.hero-card h5 {
    color: var(--text-dark);
}
.hero-list {
    list-style: none;
    padding-left: 0;
}
.hero-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}
.hero-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.6rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    box-shadow: 0 0 0 3px rgba(122,92,255,0.2);
}

/* ===== BENEFITS SECTION ===== */
.benefit-item {
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e2f0e7;
    box-shadow: 0 8px 18px rgba(0,0,0,0.06);
    transition: transform 0.3s ease;
}

.benefit-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.benefit-icon {
    color: var(--primary-color);
    font-size: 2.5rem !important;
    margin-right: 1rem;
    margin-top: 0.25rem;
}

.benefit-item h5 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* ===== STATISTICS SECTION ===== */
.stat-card {
    background: #ffffff;
    padding: 2rem 1rem;
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(0,0,0,0.06);
    transition: transform 0.3s ease;
}

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

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-color);
    font-family: var(--font-heading);
    margin-bottom: 0.5rem;
}

.stat-text {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ===== PRICING SECTION ===== */
.pricing-section {
    position: relative;
    overflow: hidden;
}

.pricing-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    opacity: 0.1;
}

.pricing-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
    height: 100%;
}

.pricing-card:hover {
    transform: translateY(-10px);
}

.pricing-card.featured {
    border: 3px solid var(--primary-color);
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(67,160,71,0.15);
}

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-10px);
}

.pricing-header {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #ffffff;
    padding: 2rem 1.5rem 1.5rem;
    text-align: center;
}

.pricing-card.featured .pricing-header {
    background: var(--accent-color);
}

.pricing-header h4 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

.pricing-body {
    padding: 2rem 1.5rem;
}

/* ===== ARTICLES SECTION ===== */
.article-content {
    padding-right: 2rem;
}

.article-content h4 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

/* ===== CONTACT FORM ===== */
.contact-form {
    background: #ffffff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid #e2f0e7;
}

.form-label {
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-control {
    border: 2px solid #d3e8db;
    border-radius: 4px;
    padding: 0.75rem;
    font-family: var(--font-body);
    transition: border-color 0.3s ease;
    background-color: #ffffff;
    color: var(--text-dark);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(67,160,71,0.15);
}

/* ===== CONTACT SECTION ===== */
.contact-info {
    background: #f4fbf6;
    padding: 1.5rem;
    border-radius: 8px;
    display: inline-block;
    border: 1px solid #e2f0e7;
}

.contact-email {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* ===== FOOTER ===== */
footer {
    background: #f1f8f5 !important;
}

/* Footer */
.site-footer a {
    color: var(--text-light);
}
.site-footer a:hover {
    color: var(--accent-color);
}
.newsletter-input {
    background: #ffffff;
    border-color: #d3e8db;
}
.social-link {
    color: var(--text-light);
}
.social-link:hover {
    color: var(--primary-color);
}

/* Checklist in contact side panel */
.checklist {
    list-style: none;
    padding-left: 0;
}
.checklist li {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}
.form-note {
    color: var(--text-light);
}

/* ===== LEGAL PAGES ===== */
.legal-main {
    margin-top: 80px;
}

.legal-section {
    padding: 50px 0;
}

.legal-section h2 {
    margin-bottom: 1.25rem;
}

.legal-section p, .legal-section li {
    color: var(--text-light);
}

.legal-section ul {
    padding-left: 1.25rem;
}

footer h5, footer h6 {
    color: var(--white);
    margin-bottom: 1rem;
}

footer a {
    color: rgba(255,255,255,0.8);
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--accent-color);
}

footer ul li {
    margin-bottom: 0.25rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .article-content {
        padding-right: 0;
        margin-bottom: 2rem;
    }
    
    .pricing-card.featured {
        transform: none;
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
        padding: 0.5rem 1.5rem;
    }
    
    .benefit-item {
        text-align: center;
        margin-bottom: 1.5rem;
    }
    
    .benefit-icon {
        display: block;
        margin: 0 auto 1rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        height: 80vh;
    }
    
    .hero-title {
        font-size: 1.6rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .cookie-banner .row {
        text-align: center;
    }
    
    .cookie-banner .col-md-3 {
        margin-top: 1rem;
    }
}

/* ===== CUSTOM ACCORDION STYLING ===== */
.custom-accordion {
    border-radius: 12px;
    overflow: hidden;
}

.custom-accordion-item {
    background: #ffffff;
    border: 1px solid #e2f0e7;
    border-radius: 8px !important;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.custom-accordion-item:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.custom-accordion-button {
    background: linear-gradient(135deg, #ffffff, #f8fffe);
    border: none;
    padding: 1.5rem 2rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-dark);
    text-align: left;
    border-radius: 8px !important;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.custom-accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, var(--primary-color), #66bb6a);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(67,160,71,0.3);
}

.custom-accordion-button:not(.collapsed) .material-icons-outlined {
    color: #ffffff;
}

.custom-accordion-button:hover {
    background: linear-gradient(135deg, #f0f8f0, #e8f5e9);
    color: var(--primary-color);
}

.custom-accordion-button:hover .material-icons-outlined {
    color: var(--primary-color);
}

.custom-accordion-button:not(.collapsed):hover {
    background: linear-gradient(135deg, #2e7d32, var(--primary-color));
    color: #ffffff;
}

.custom-accordion-button:not(.collapsed):hover .material-icons-outlined {
    color: #ffffff;
}

.custom-accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2343a047'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    transition: transform 0.3s ease;
    width: 1.5rem;
    height: 1.5rem;
}

.custom-accordion-button:not(.collapsed)::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    transform: rotate(180deg);
}

.custom-accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(67,160,71,0.25);
    border-color: transparent;
}

.custom-accordion-body {
    background: #ffffff;
    padding: 2rem;
    border-top: 1px solid #e2f0e7;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-light);
}

.custom-accordion-body p {
    margin-bottom: 1rem;
}

.custom-accordion-body p:last-child {
    margin-bottom: 0;
}

.custom-accordion-body p:first-child {
    font-weight: 500;
    color: var(--text-dark);
}

/* Material Icons styling */
.custom-accordion-button .material-icons-outlined {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

/* ===== SCROLL PADDING FOR FIXED HEADER ===== */
section {
    scroll-margin-top: 80px;
}

/* ===== DARK ACCENT SECTIONS ===== */
.with-dark-accent {
    position: relative;
}

.with-dark-accent::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(27,27,47,0.06), rgba(27,27,47,0));
    pointer-events: none;
}

/* Hover accents for cards/images */
.benefit-item img {
    transition: transform 0.3s ease, filter 0.3s ease;
}

.benefit-item:hover img {
    transform: scale(1.015);
    filter: saturate(1.05);
}

/* Accordion dark accent */
.accordion-button {
    font-family: var(--font-heading);
}

.accordion-button:not(.collapsed) {
    color: var(--white);
    background: linear-gradient(90deg, var(--dark), #222244);
    box-shadow: none;
}

.accordion-item {
    border: 0;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.15rem rgba(27,27,47,0.25);
}