/* ========================================
   Comparador Premium - BCP Corredora de Seguros
   ======================================== */

/* ========================================
   Hero del Comparador
   ======================================== */
.comparador-hero {
    background: var(--gradient-hero);
    color: var(--white);
    padding: 140px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.comparador-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.comparador-hero .container {
    position: relative;
    z-index: 1;
}

.comparador-hero h1 {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    letter-spacing: -1px;
}

.comparador-hero .hero-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.92;
    line-height: 1.7;
}

/* ========================================
   Filter Section
   ======================================== */
.filter-section {
    padding: 50px 0;
    background: var(--pearl);
    border-bottom: 2px solid var(--light-gray);
}

.filter-container {
    max-width: 1200px;
    margin: 0 auto;
}

.filter-container h2 {
    color: var(--primary-dark);
    font-family: var(--font-display);
    font-size: 1.75rem;
    margin-bottom: 2rem;
    font-weight: 600;
    text-align: center;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    color: var(--primary-dark);
    font-weight: 600;
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
}

.filter-group select {
    padding: 14px 18px;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: var(--font-primary);
    background: var(--white);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-group select:hover {
    border-color: var(--medium-gray);
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(30, 74, 122, 0.1);
}

.filter-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-clear,
.btn-compare {
    padding: 14px 32px;
    border: none;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-primary);
}

.btn-clear {
    background: var(--white);
    color: var(--primary-dark);
    border: 2px solid var(--light-gray);
}

.btn-clear:hover {
    background: var(--pearl);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-compare {
    background: var(--gradient-gold);
    color: var(--primary-dark);
    box-shadow: var(--shadow-gold);
}

.btn-compare:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(201, 164, 62, 0.4);
}

.btn-compare:disabled {
    background: var(--light-gray);
    color: var(--medium-gray);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* ========================================
   Policies Section
   ======================================== */
.policies-section {
    padding: 80px 0;
    background: var(--white);
}

.policies-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.policies-header h2 {
    color: var(--primary-dark);
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 600;
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sort-options label {
    color: var(--medium-gray);
    font-weight: 500;
}

.sort-options select {
    padding: 10px 16px;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-md);
    background: var(--white);
    cursor: pointer;
    font-family: var(--font-primary);
    transition: all var(--transition-fast);
}

.sort-options select:focus {
    border-color: var(--primary);
    outline: none;
}

/* ========================================
   Policies Grid
   ======================================== */
.policies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 2rem;
}

.policy-card {
    background: var(--white);
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-xl);
    padding: 0;
    transition: all var(--transition-normal);
    overflow: hidden;
    position: relative;
}

.policy-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.policy-card.selected {
    border-color: var(--secondary);
    box-shadow: var(--shadow-gold);
}

.policy-card.selected::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-gold);
}

/* ========================================
   Policy Header
   ======================================== */
.policy-header {
    background: var(--pearl);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--light-gray);
}

.company-logo {
    font-weight: 700;
    color: var(--primary-dark);
    font-size: 0.95rem;
}

.policy-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rating {
    font-weight: 700;
    color: var(--primary-dark);
    font-size: 0.95rem;
}

.stars {
    color: var(--secondary);
    font-size: 0.85rem;
}

.policy-select input[type="checkbox"] {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* ========================================
   Policy Content
   ======================================== */
.policy-content {
    padding: 1.75rem;
}

.policy-content h3 {
    color: var(--primary-dark);
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.policy-type {
    color: var(--medium-gray);
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
}

.policy-price {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.policy-price .price {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--primary-dark);
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

.policy-price .period {
    color: var(--medium-gray);
    font-size: 0.95rem;
}

/* ========================================
   Coverage Levels
   ======================================== */
.coverage-level {
    display: inline-block;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
}

.coverage-level.basic {
    background: var(--pearl);
    color: var(--medium-gray);
    border: 1px solid var(--light-gray);
}

.coverage-level.intermediate {
    background: rgba(30, 74, 122, 0.1);
    color: var(--primary);
    border: 1px solid var(--primary-light);
}

.coverage-level.premium {
    background: var(--gradient-gold);
    color: var(--primary-dark);
}

.coverage-level.complete {
    background: var(--gradient-primary);
    color: var(--white);
}

/* ========================================
   Features List
   ======================================== */
.features-list {
    margin-bottom: 2rem;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    font-size: 0.95rem;
}

.feature i {
    width: 18px;
    text-align: center;
}

.feature.limited {
    opacity: 0.6;
}

.feature .fas.fa-check {
    color: var(--accent-green);
}

.feature .fas.fa-times {
    color: var(--medium-gray);
}

.feature span {
    color: var(--dark-gray);
}

/* ========================================
   Policy Actions
   ======================================== */
.policy-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-details,
.policy-actions .btn-quote {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-primary);
}

.btn-details {
    background: var(--pearl);
    color: var(--primary-dark);
    border: 2px solid var(--light-gray);
}

.btn-details:hover {
    background: var(--light-gray);
    border-color: var(--primary);
}

.policy-actions .btn-quote {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.policy-actions .btn-quote:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ========================================
   No Results
   ======================================== */
.no-results {
    text-align: center;
    padding: 5rem 2rem;
    color: var(--medium-gray);
}

.no-results i {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    opacity: 0.3;
    color: var(--primary-light);
}

.no-results h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.no-results p {
    color: var(--medium-gray);
}

/* ========================================
   Comparison Modal
   ======================================== */
.comparison-modal {
    max-width: 95vw;
    max-height: 90vh;
    overflow: auto;
}

.comparison-modal .modal-body {
    padding: 1.5rem;
}

#comparisonTable {
    overflow-x: auto;
    margin-bottom: 2rem;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.comparison-table th,
.comparison-table td {
    padding: 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--light-gray);
}

.comparison-table th {
    background: var(--gradient-primary);
    font-weight: 600;
    color: var(--white);
    position: sticky;
    top: 0;
    z-index: 10;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table .feature-row td:first-child {
    font-weight: 600;
    background: var(--pearl);
    color: var(--primary-dark);
}

.comparison-table .check {
    color: var(--accent-green);
    font-weight: bold;
}

.comparison-table .cross {
    color: var(--medium-gray);
    font-weight: bold;
}

.comparison-table tr:nth-child(even) {
    background: var(--pearl);
}

.comparison-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-contact {
    background: var(--gradient-gold);
    color: var(--primary-dark);
    padding: 16px 32px;
    border: none;
    border-radius: var(--radius-full);
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-primary);
    box-shadow: var(--shadow-gold);
}

.btn-contact:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(201, 164, 62, 0.4);
}

/* ========================================
   Policy Details Modal
   ======================================== */
.policy-modal {
    max-width: 650px;
}

.policy-details {
    display: grid;
    gap: 2rem;
}

.detail-section h4 {
    color: var(--primary-dark);
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-section h4 i {
    color: var(--secondary);
}

.detail-section ul {
    list-style: none;
    padding: 0;
}

.detail-section li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--dark-gray);
}

.detail-section li i {
    color: var(--accent-green);
    width: 18px;
}

/* ========================================
   CTA Section (Comparador)
   ======================================== */
.comparador-cta {
    background: var(--gradient-hero);
    color: var(--white);
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.comparador-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.comparador-cta .cta-content {
    position: relative;
    z-index: 1;
}

.comparador-cta .cta-content h2 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.comparador-cta .cta-content p {
    font-size: 1.2rem;
    max-width: 650px;
    margin: 0 auto 2.5rem;
    opacity: 0.92;
    line-height: 1.7;
}

.cta-buttons {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-white,
.btn-outline-white {
    padding: 18px 36px;
    border-radius: var(--radius-full);
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    transition: all var(--transition-fast);
    display: inline-block;
    font-family: var(--font-primary);
}

.btn-white {
    background: var(--white);
    color: var(--primary-dark);
    border: 2px solid var(--white);
    box-shadow: var(--shadow-lg);
}

.btn-white:hover {
    background: var(--secondary);
    border-color: var(--secondary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.btn-outline-white {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.6);
}

.btn-outline-white:hover {
    background: var(--white);
    color: var(--primary-dark);
    border-color: var(--white);
    transform: translateY(-3px);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 992px) {
    .comparador-hero h1 {
        font-size: 2.75rem;
    }
}

@media (max-width: 768px) {
    .comparador-hero {
        padding: 100px 0 70px;
    }

    .comparador-hero h1 {
        font-size: 2.25rem;
    }
    
    .comparador-hero .hero-subtitle {
        font-size: 1.05rem;
    }
    
    .filter-section {
        padding: 30px 0;
    }

    .filter-grid {
        grid-template-columns: 1fr;
    }
    
    .policies-section {
        padding: 60px 0;
    }

    .policies-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .policies-grid {
        grid-template-columns: 1fr;
    }
    
    .policy-actions {
        flex-direction: column;
    }
    
    .filter-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn-clear,
    .btn-compare {
        width: 100%;
        max-width: 300px;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-white,
    .btn-outline-white {
        width: 100%;
        max-width: 320px;
        text-align: center;
    }
    
    .comparison-modal {
        max-width: 98vw;
    }
    
    .comparison-table {
        font-size: 0.85rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 0.75rem;
    }
    
    .comparison-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .filter-section {
        padding: 20px 0;
    }

    .filter-container h2 {
        font-size: 1.5rem;
    }
    
    .policies-section {
        padding: 40px 0;
    }

    .policies-header h2 {
        font-size: 1.5rem;
    }
    
    .policy-card {
        margin: 0;
    }

    .policy-content {
        padding: 1.25rem;
    }

    .policy-price .price {
        font-size: 1.75rem;
    }
    
    .comparador-cta {
        padding: 60px 0;
    }

    .comparador-cta .cta-content h2 {
        font-size: 1.75rem;
    }

    .comparador-cta .cta-content p {
        font-size: 1rem;
    }
}
