/**
 * Calculator Landing Page Styles
 * Mobile-first, responsive design matching existing design system
 */

/* Using existing CSS variables from custom.css:
   --primary-color: #2A2A2A
   --secondary-color: #F0E8D8
   --text-color: #1F1F1F
   --accent-color: #D08B5C
   --white-color: #FFFFFF
   --divider-color: #E5DDD0
   --secondary-accent: #b26a12
*/

.btn-calculator-link {
    display: inline-flex;
    align-items: center;
    color: var(--accent-color);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-calculator-link:hover {
    color: var(--secondary-accent);
}

.btn-calculator-link i {
    transition: transform 0.3s ease;
}

.btn-calculator-link:hover i {
    transform: translateX(5px);
}

/* ================================
   Section Common Styles
   ================================ */

/* Ensure no gaps between sections */
.calculator-hero,
.calculator-value-section,
.calculator-steps-section,
.calculator-preview-section,
.calculator-explanation-section,
.calculator-faqs-section {
    margin-bottom: 0;
}

.calculator-hero .section-title,
.calculator-value-section .section-title,
.calculator-steps-section .section-title,
.calculator-preview-section .section-title,
.calculator-explanation-section .section-title,
.calculator-faqs-section .section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 16px;
    line-height: 1.3;
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-color);
    margin-bottom: 0;
    line-height: 1.6;
    opacity: 0.8;
}

.section-description {
    font-size: 16px;
    color: var(--text-color);
    line-height: 1.7;
    max-width: 700px;
    margin: 0 auto 24px;
    opacity: 0.8;
}

/* ================================
   Fold 1: Hero Section
   ================================ */
.calculator-hero {
    position: relative;
    min-height: calc(100vh + 118px);
    padding-top: 200px;
    padding-bottom: 100px;
    margin-top: -118px;
    background-color: var(--primary-color);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
}

.calculator-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(42, 42, 42, 0.7) 0%, rgba(42, 42, 42, 0.4) 100%);
}

.calculator-hero-content {
    position: relative;
    z-index: 2;
    color: var(--white-color);
}

.calculator-hero-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--white-color);
}

.calculator-hero-subtitle {
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 12px;
    opacity: 0.95;
    color: var(--white-color);
}

.calculator-hero-description {
    font-size: 14px;
    max-width: 500px;
    margin: 0 auto 24px;
    opacity: 0.85;
    color: var(--white-color);
}

/* ================================
   Fold 2: Value Proposition
   ================================ */
.calculator-value-section {
    padding: 60px 0;
    margin: 0;
    background-color: var(--white-color);
}

.calculator-value-section .section-title {
    font-size: 24px;
    color: var(--primary-color);
}

.value-highlights {
    list-style: none;
    padding: 0;
    margin: 24px 0;
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.value-highlights li {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: var(--text-color);
}

.value-highlights li i {
    color: var(--accent-color);
    margin-right: 8px;
    font-size: 16px;
}

/* ================================
   Fold 3: How It Works / Steps
   ================================ */
.calculator-steps-section {
    padding: 60px 0;
    background-color: var(--secondary-color);
}

.calculator-steps-section .section-title {
    font-size: 28px;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.calculator-steps-wrapper {
    margin-top: 40px;
}

.calculator-steps-grid {
    position: relative;
}

.calculator-step-card {
    text-align: center;
    padding: 20px 15px;
    margin-bottom: 30px;
}

.step-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.step-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white-color);
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 2;
}

.step-icon img {
    max-width: 40px;
    max-height: 40px;
}

.step-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-color);
}

.step-connector {
    position: absolute;
    top: 50%;
    left: calc(50% + 50px);
    width: calc(100% - 60px);
    height: 2px;
    border-top: 2px dashed var(--divider-color);
    z-index: 1;
}

.step-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.step-description {
    font-size: 14px;
    color: var(--text-color);
    line-height: 1.5;
    margin-bottom: 0;
    opacity: 0.8;
}

/* ================================
   Fold 4: Visual Preview / Carousel
   ================================ */
.calculator-preview-section {
    padding: 60px 0;
    background-color: var(--white-color);
}

.calculator-preview-section .section-title {
    font-size: 28px;
    margin-bottom: 4px;
    color: var(--primary-color);
}

.calculator-preview-slider {
    margin-top: 30px;
    padding-bottom: 50px;
}

.calculator-preview-slider .swiper-wrapper {
    align-items: stretch;
}

.calculator-preview-slider .swiper-slide {
    height: auto;
}

.preview-card {
    background: var(--white-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.preview-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}


.preview-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--divider-color) 100%);
}

.preview-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.preview-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.preview-description {
    font-size: 14px;
    color: var(--text-color);
    line-height: 1.5;
    margin-bottom: 12px;
    opacity: 0.8;
}

.preview-price {
    display: inline-block;
    padding: 6px 14px;
    background: var(--accent-color);
    color: var(--white-color);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* Swiper Navigation */
.calculator-preview-slider .swiper-button-prev,
.calculator-preview-slider .swiper-button-next {
    width: 40px;
    height: 40px;
    background: var(--white-color);
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.calculator-preview-slider .swiper-button-prev:after,
.calculator-preview-slider .swiper-button-next:after {
    font-size: 16px;
    color: var(--primary-color);
}

.calculator-preview-slider .swiper-pagination-bullet {
    background: var(--divider-color);
    opacity: 1;
}

.calculator-preview-slider .swiper-pagination-bullet-active {
    background: var(--accent-color);
}

/* ================================
   Fold 5: Detailed Explanation
   ================================ */
.calculator-explanation-section {
    padding: 60px 0;
    background-color: var(--secondary-color);
}

.calculator-explanation-section .section-title {
    font-size: 28px;
    margin-bottom: 16px;
    color: var(--primary-color);
}

.section-intro {
    font-size: 15px;
    color: var(--text-color);
    line-height: 1.7;
    margin-bottom: 30px;
    opacity: 0.85;
}

.explanation-list {
    margin-top: 20px;
}

.explanation-item {
    margin-bottom: 24px;
}

.explanation-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.explanation-description {
    font-size: 14px;
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 0;
    opacity: 0.85;
}

.explanation-factors {
    margin-top: 10px;
    padding-left: 20px;
}

.explanation-factors li {
    font-size: 14px;
    color: var(--text-color);
    margin-bottom: 6px;
    opacity: 0.8;
}

/* ================================
   Fold 6: FAQs
   ================================ */
.calculator-faqs-section {
    padding: 60px 0;
    background-color: var(--white-color);
}

.calculator-faqs-section .section-title {
    font-size: 28px;
    margin-bottom: 24px;
    color: var(--primary-color);
}

.calculator-faqs-section .faq-accordion {
    margin-top: 10px;
}

.calculator-faqs-section .faq-accordion .accordion-item {
    background: var(--secondary-color);
    border: none !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    border-bottom: none !important;
    border-radius: 4px;
    margin-bottom: 12px;
    box-shadow: none;
    overflow: hidden;
}

.calculator-faqs-section .faq-accordion .accordion-header {
    margin: 0;
}

.calculator-faqs-section .faq-accordion .accordion-button {
    font-weight: 500;
    font-size: 15px;
    padding: 18px 20px;
    background: var(--secondary-color);
    color: var(--primary-color);
    box-shadow: none !important;
    border: none !important;
    border-left: none !important;
    line-height: 1.5;
    display: flex;
    align-items: center;
    text-align: left;
    position: relative;
}

.calculator-faqs-section .faq-accordion .accordion-button:not(.collapsed) {
    background: var(--secondary-color);
    color: var(--primary-color);
    border: none;
}

.calculator-faqs-section .faq-accordion .accordion-button:focus {
    box-shadow: none;
    border-color: transparent;
}

.calculator-faqs-section .faq-accordion .faq-question-text {
    flex: 1;
    text-align: left;
    display: flex;
    align-items: baseline;
}

.calculator-faqs-section .faq-accordion .accordion-button::after {
    content: '+';
    background: none !important;
    background-image: none !important;
    width: 24px;
    height: 24px;
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
    color: var(--primary-color);
    text-align: center;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    align-self: center;
    position: static !important;
    transform: none !important;
    transition: none !important;
}

.calculator-faqs-section .faq-accordion .accordion-button:not(.collapsed)::after {
    content: '−';
    transform: none !important;
    transition: none !important;
}

.calculator-faqs-section .faq-accordion .faq-number {
    color: var(--accent-color);
    margin-right: 10px;
    font-weight: 600;
    flex-shrink: 0;
}

.calculator-faqs-section .faq-accordion .accordion-body {
    padding: 0 20px 18px;
    padding-left: 45px;
}

.calculator-faqs-section .faq-accordion .accordion-body p {
    font-size: 14px;
    color: var(--text-color);
    line-height: 1.7;
    margin-bottom: 0;
    opacity: 0.85;
}

.calculator-faqs-image {
    margin-top: 30px;
}

.calculator-faqs-image img {
    width: 100%;
    border-radius: 12px;
}

/* ================================
   Responsive Styles
   ================================ */

/* Tablet and up */
@media (min-width: 768px) {
    .section-title {
        font-size: 36px;
    }

    .calculator-hero-title {
        font-size: 48px;
    }

    .calculator-hero-subtitle {
        font-size: 20px;
    }

    .calculator-value-section .section-title {
        font-size: 32px;
    }

    .calculator-steps-section,
    .calculator-preview-section,
    .calculator-explanation-section,
    .calculator-faqs-section {
        padding: 80px 0;
    }

    .calculator-value-section {
        padding: 80px 0;
    }
}

/* Desktop and up */
@media (min-width: 992px) {
    .section-title {
        font-size: 42px;
    }

    .calculator-hero-title {
        font-size: 56px;
    }

    .calculator-hero-subtitle {
        font-size: 22px;
    }

    .calculator-hero-description {
        font-size: 16px;
    }

    .calculator-steps-section,
    .calculator-preview-section,
    .calculator-explanation-section,
    .calculator-faqs-section {
        padding: 100px 0;
    }

    .preview-image {
        height: 220px;
    }

    .calculator-faqs-section .faq-accordion .accordion-button {
        font-size: 16px;
    }
}

/* Large desktop */
@media (min-width: 1200px) {
    .calculator-hero-title {
        font-size: 64px;
    }
}

/* Mobile specific adjustments */
@media (max-width: 767px) {
    .calculator-hero {
        min-height: calc(100vh + 92px);
        padding-top: 150px;
        margin-top: -92px;
    }

    .btn-calculator-primary {
        padding: 12px 30px;
        font-size: 13px;
    }

    .step-connector {
        display: none;
    }

    .calculator-preview-section .row.align-items-center {
        text-align: center;
    }

    .calculator-preview-section .col-lg-4 {
        margin-top: 20px;
    }

    .calculator-preview-slider .swiper-button-prev,
    .calculator-preview-slider .swiper-button-next {
        display: none;
    }

    .value-highlights {
        flex-direction: column;
        align-items: center;
    }
}

/* Hide step connectors on tablet */
@media (max-width: 991px) {
    .step-connector {
        display: none;
    }
}
