/* EnergíaSegura - Minimal Landing Page CSS */
/* Inspired by energia-confiable.com style */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1e293b;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

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

/* Main Container */
.main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    margin-top: 80px; /* Fixed header height */
    min-height: calc(100vh - 80px);
}

/* Main Header */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: auto;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    max-width: 100%;
    height: 50px;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
    flex: 0 1 auto;
    min-width: 0;
}

.header-left {
    justify-content: flex-start;
}

.header-right {
    justify-content: flex-end;
}

.header-left i {
    color: #10b981;
    font-size: 14px;
}

.header-center {
    display: flex;
    justify-content: center;
    flex: 1 1 auto;
    min-width: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-circle {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    flex-shrink: 0;
}

.logo-text {
    text-align: left;
}

.logo-main {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
    margin-bottom: 2px;
}

.logo-sub {
    font-size: 10px;
    font-weight: 500;
    color: #10b981;
    line-height: 1;
}

.header-banner {
    background: linear-gradient(135deg, #1e40af, #1d4ed8);
    color: white;
    padding: 8px 15px;
    min-height: 30px;
    display: flex;
    align-items: center;
}

.banner-text {
    text-align: center;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.3;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    color: white;
    padding: 20px 15px;
    text-align: center;
    margin: 0;
    width: 100%;
    flex-shrink: 0;
}

.hero-content h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    max-width: 100%;
}

/* Progress Section */
.progress-section {
    text-align: center;
    padding: 20px;
    animation: fadeInUp 0.8s ease-out;
}

.progress-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 30px;
    line-height: 1.4;
}

.progress-bar-container {
    background: #f0f0f0;
    border-radius: 25px;
    height: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 25px;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 20px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4));
    animation: shimmer 1.5s infinite;
}

.progress-percentage {
    font-size: 18px;
    font-weight: 600;
    color: #10b981;
}

/* Success Message */
.success-message {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin-top: 20px;
    animation: fadeInUp 0.6s ease-out;
}

.success-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.success-text h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 10px;
}

.success-text p {
    font-size: 16px;
    opacity: 0.9;
}

/* Form Section */
.form-section {
    background: white;
    border-radius: 15px;
    padding: 25px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    max-width: 500px;
    width: calc(100% - 30px);
    margin: 15px 15px 30px 15px;
    flex: 1 0 auto;
}

.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.form-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.form-header p {
    color: #666;
    font-size: 16px;
}


/* Styling for Step 3.5 Budget Comparison */
[data-step="3.5"] .options-grid {
    grid-template-columns: 1fr; /* Stack buttons vertically on mobile */
    gap: 12px;
}

/* Ensure the new icons match the Energy ES green theme */
[data-step="3.5"] .option-content i {
    color: #10b981;
    font-size: 22px;
}

/* White icons when the card is selected */
.option-card.selected[data-step="3.5"] .option-content i {
    color: white !important;
}

/* Adjust title spacing for the new two-line heading */
[data-step="3.5"] h3 {
    line-height: 1.4;
    margin-bottom: 20px;
}

/* Step Indicator */
.step-indicator {
    margin-bottom: 30px;
}

.step-progress {
    background: #f0f0f0;
    border-radius: 10px;
    height: 6px;
    margin-bottom: 15px;
    overflow: hidden;
}

.step-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 10px;
    width: 20%;
    transition: width 0.4s ease;
}

.step-counter {
    text-align: center;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* Form Steps */
.form-step {
    display: none;
    animation: fadeInUp 0.5s ease-out;
}

.form-step.active {
    display: block;
}

.step-content h3 {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin-bottom: 25px;
    text-align: center;
}

/* Options Grid */
.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.option-card {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8fafc;
    position: relative;
    overflow: hidden;
}

.option-card:hover {
    border-color: #10b981;
    background: #ecfdf5;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.15);
}

.option-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.option-card input[type="radio"]:checked + .option-content {
    color: #10b981;
}

.option-card input[type="radio"]:checked ~ .option-card {
    border-color: #10b981;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.option-card.selected {
    border-color: #10b981;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.25);
}

.option-content {
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.option-content i {
    font-size: 24px;
    color: #10b981;
    transition: color 0.3s ease;
}

.option-card.selected .option-content i {
    color: white;
}

/* Input Groups */
.input-group {
    margin-bottom: 20px;
}

.input-group input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.input-group input:focus {
    outline: none;
    border-color: #10b981;
    background: white;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.input-group input.success {
    border-color: #22c55e;
    background: #f0fdf4;
}

.input-group input.error {
    border-color: #ef4444;
    background: #fef2f2;
}

/* Error Messages */
.error-message {
    color: #ef4444;
    font-size: 14px;
    margin-top: 8px;
    padding-left: 5px;
    display: none;
}

.error-message.show {
    display: block;
    animation: fadeInUp 0.3s ease-out;
}

/* Privacy Notice */
.privacy-notice {
    margin-top: 20px;
}

.privacy-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
}

.privacy-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkmark {
    min-width: 20px;
    height: 20px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.privacy-checkbox input:checked + .checkmark {
    background: #10b981;
    border-color: #10b981;
}

.privacy-checkbox input:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 12px;
}

.privacy-text a {
    color: #10b981;
    text-decoration: none;
    font-weight: 500;
}

.privacy-text a:hover {
    text-decoration: underline;
}

/* Form Navigation */
.form-navigation {
    margin-top: 30px;
    text-align: center;
}

.btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    min-width: 150px;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.4s ease-out;
}

.modal-header {
    padding: 30px;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
}

.modal-header h2,
.modal-header h3 {
    color: #333;
    margin-bottom: 10px;
}

.success-icon-large {
    font-size: 64px;
    color: #22c55e;
    margin-bottom: 20px;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
}

.modal-body {
    padding: 30px;
}

.contact-info {
    margin: 20px 0;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
}

.contact-item i {
    font-size: 24px;
    color: #10b981;
    margin-top: 5px;
}

.contact-item h4 {
    color: #333;
    margin-bottom: 8px;
}

.important-notice {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    color: #9a3412;
    font-size: 14px;
}

.modal-footer {
    padding: 20px 30px;
    text-align: center;
    border-top: 1px solid #e2e8f0;
}

.privacy-content {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.privacy-content h4 {
    color: #333;
    margin: 20px 0 15px 0;
    font-size: 16px;
}

.privacy-content p {
    margin-bottom: 15px;
    color: #666;
    line-height: 1.6;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .main-container {
        margin-top: 75px;
        min-height: calc(100vh - 75px);
    }
    
    .header-content {
        padding: 8px 12px;
        height: 45px;
    }
    
    .header-left, .header-right {
        font-size: 10px;
        flex: 0 1 25%;
    }
    
    .header-center {
        flex: 1 1 50%;
    }
    
    .logo-circle {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .logo-main {
        font-size: 11px;
    }
    
    .logo-sub {
        font-size: 9px;
    }
    
    .header-banner {
        padding: 6px 12px;
        min-height: 28px;
    }
    
    .banner-text {
        font-size: 10px;
    }
    
    .hero-section {
        padding: 18px 12px;
    }
    
    .hero-content h1 {
        font-size: 20px;
        margin: 0;
    }
    
    .form-section {
        width: calc(100% - 20px);
        margin: 10px 10px 20px 10px;
        padding: 20px 15px;
    }
    
    .form-header {
        margin-bottom: 25px;
    }
    
    .form-header h2 {
        font-size: 24px;
        margin-bottom: 8px;
    }
    
    .form-header p {
        font-size: 14px;
    }
    
    .step-content h3 {
        font-size: 18px;
        margin-bottom: 20px;
    }
    
    .option-card {
        padding: 15px;
        margin-bottom: 12px;
    }
    
    .input-group input {
        padding: 12px 15px;
        font-size: 16px;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .main-container {
        margin-top: 70px;
        min-height: calc(100vh - 70px);
    }
    
    .header-content {
        padding: 6px 10px;
        height: 40px;
        gap: 5px;
    }
    
    .header-left, .header-right {
        font-size: 9px;
        gap: 4px;
        flex: 0 1 30%;
        white-space: nowrap;
        overflow: hidden;
    }
    
    .header-center {
        flex: 1 1 40%;
    }
    
    .logo-circle {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }
    
    .logo-main {
        font-size: 10px;
    }
    
    .logo-sub {
        font-size: 8px;
    }
    
    .header-banner {
        padding: 5px 10px;
        min-height: 28px;
    }
    
    .banner-text {
        font-size: 9px;
        line-height: 1.2;
    }
    
    .hero-section {
        padding: 15px 10px;
        margin-top: 0;
    }
    
    .hero-content h1 {
        font-size: 18px;
        margin: 0;
        line-height: 1.3;
        padding: 0;
    }
    
    .form-section {
        margin: 8px 8px 15px 8px;
        padding: 18px 12px;
        width: calc(100% - 16px);
    }
    
    .form-header {
        margin-bottom: 20px;
    }
    
    .form-header h2 {
        font-size: 20px;
        margin-bottom: 6px;
    }
    
    .form-header p {
        font-size: 13px;
    }
    
    .progress-title {
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    .step-content h3 {
        font-size: 16px;
        margin-bottom: 18px;
    }
    
    .option-card {
        padding: 12px;
        margin-bottom: 10px;
    }
    
    .option-content {
        gap: 10px;
        font-size: 14px;
    }
    
    .input-group {
        margin-bottom: 15px;
    }
    
    .input-group input {
        padding: 12px 15px;
        font-size: 16px;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 14px;
        min-width: 140px;
    }
    
    .form-navigation {
        margin-top: 20px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .option-card {
        border-width: 3px;
    }
    
    .input-group input {
        border-width: 3px;
    }
    
    .checkmark {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Privacy notice styles */
.privacy-notice {
    margin-top: 20px;
}

.privacy-info {
    margin-top: 16px;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    color: #64748b;
}

.privacy-info a {
    color: #10b981;
    text-decoration: none;
    font-weight: 500;
}

.privacy-info a:hover {
    text-decoration: underline;
}

.privacy-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: #475569;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    position: relative;
}

.checkbox-container input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

.checkmark {
    flex-shrink: 0;
}

/* Print styles */
@media print {
    .header-section,
    .form-navigation,
    .modal {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .progress-section,
    .form-section {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* ===================================
   Footer Styles
   =================================== */
footer {
    background: #1a252f;
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand .logo {
    margin-bottom: 1rem;
}

.footer-brand p {
    color: #b0bec5;
    line-height: 1.6;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-column h4 {
    color: #2f7d32;
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 0.5rem;
}

.footer-column a {
    color: #b0bec5;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: white;
}

.footer-column li:not(:has(a)) {
    color: #b0bec5;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-column i {
    color: #2f7d32;
    width: 16px;
}

.footer-bottom {
    border-top: 1px solid #37474f;
    padding-top: 2rem;
    text-align: center;
    color: #b0bec5;
}

/* --- COOKIE BANNER MINIMIZER --- */

/* 1. Force the banner to sit at the very bottom (Mobile Bar Style) */
#CybotCookiebotDialog {
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    transform: none !important; /* Removes centering */
    border-radius: 15px 15px 0 0 !important; /* Optional: Nice rounded corners */
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1) !important;
    animation: slideUp 0.5s ease !important;
}

/* 2. Hide the huge category switches (Necessary, Marketing, etc.) by default */
#CybotCookiebotDialog #CybotCookiebotDialogBodyLevelWrapper {
    display: none !important;
}

/* 3. CRITICAL: Show the switches ONLY when user clicks 'Personalizar' */
/* Cookiebot adds the class 'CybotCookiebotDialogDetailOpen' when expanded */
#CybotCookiebotDialog.CybotCookiebotDialogDetailOpen #CybotCookiebotDialogBodyLevelWrapper {
    display: block !important;
    padding-bottom: 20px;
}

/* 4. Hide the redundant "Mostrar detalles" link to save more space */
#CybotCookiebotDialog #CybotCookiebotDialogBodyEdgeMoreDetails {
    display: none !important;
}

/* 5. Reduce padding to make it compact on mobile */
#CybotCookiebotDialog .CybotCookiebotDialogContentWrapper {
    padding: 15px !important;
}

/* 6. Ensure the logo area doesn't take unnecessary space */
#CybotCookiebotDialogHeader {
    align-items: center !important;
}

/* Footer responsive styles */
@media (max-width: 768px) {
    footer {
        padding: 40px 0 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-bottom: 2rem;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* ===================================
   Checkbox Styles (2-checkbox system)
   =================================== */
.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    cursor: pointer;
}

.checkbox-container input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark {
    background: #059669;
    border-color: #2f7d32;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.privacy-text {
    font-size: 0.9rem;
    color: #5a6c7d;
    line-height: 1.5;
}

/* New checkbox styles */
.form-check-container {
    margin-bottom: 1rem;
}

.form-check-container.mb-1 {
    margin-bottom: 0.5rem;
}

.checkbox-label {
    font-size: 0.9rem;
    color: #5a6c7d;
    line-height: 1.5;
}

.discreet-link {
    color: #059669;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.discreet-link:hover {
    color: #2f7d32;
    text-decoration: underline;
}

.privacy-text a {
    color: #1a365d;
    text-decoration: none;
}

.privacy-text a:hover {
    text-decoration: underline;
}