@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;500;700;800&display=swap');

:root {
    /* Color Palette matching the elegant Logo (Beige/Brown & Modern) */
    --primary-color: #A67C52; /* Elegant brownish/beige from logo */
    --primary-light: #D4BBA5;
    --primary-dark: #7A5836;
    --accent-color: #FF5A5F; /* Keep a pop of color for CTA if needed */
    
    --bg-color: #FDFBF9; /* Very light warm white */
    --surface-color: #FFFFFF;
    
    --text-main: #2C3E50;
    --text-muted: #6C7A89;
    
    --border-color: #E8E1DA;
    
    /* Shadows */
    --shadow-sm: 0 4px 6px rgba(166, 124, 82, 0.08);
    --shadow-md: 0 10px 25px rgba(166, 124, 82, 0.12);
    --shadow-lg: 0 20px 40px rgba(166, 124, 82, 0.18);
    
    /* Radii */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Heebo', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    direction: rtl;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: var(--primary-dark);
    transition: var(--transition);
}

/* =========================================
   Typography
========================================= */
h1, h2, h3, h4 {
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-main);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-header p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* =========================================
   Buttons
========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: var(--radius-full);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: 0 8px 20px rgba(166, 124, 82, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(166, 124, 82, 0.4);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--primary-dark);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-text {
    background: transparent;
    color: var(--primary-dark);
    padding: 14px 10px;
}

.btn-text:hover {
    color: var(--accent-color);
}

.btn-large {
    padding: 16px 36px;
    font-size: 1.2rem;
}

.btn-full {
    width: 100%;
}

/* =========================================
   Navbar
========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(253, 251, 249, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 15px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 45px;
    object-fit: contain;
}

.fallback-logo {
    border-radius: var(--radius-sm);
}

.nav-links-main {
    display: flex;
    gap: 30px;
}

.nav-links-main a {
    color: var(--text-main);
    font-weight: 500;
    font-size: 1.1rem;
    position: relative;
}

.nav-links-main a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0%;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-links-main a:hover {
    color: var(--primary-color);
}

.nav-links-main a:hover::after {
    width: 100%;
}

/* =========================================
   Hero Section
========================================= */
.hero {
    position: relative;
    padding: 160px 20px 100px;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(to bottom, #FFF, var(--bg-color));
}

.hero-bg-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
    animation: float 10s infinite alternate ease-in-out;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-light);
    top: -100px;
    right: -100px;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: rgba(255, 90, 95, 0.2);
    bottom: -50px;
    left: -50px;
    animation-delay: -5s;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(166, 124, 82, 0.1);
    color: var(--primary-dark);
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 20px;
    border: 1px solid rgba(166, 124, 82, 0.2);
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 25px;
}

.highlight-text {
    color: var(--primary-color);
    position: relative;
    display: inline-block;
}

.highlight-text::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 30%;
    background: var(--primary-light);
    opacity: 0.3;
    z-index: -1;
    border-radius: 4px;
}

.hero p.subtitle {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    align-items: center;
}

/* =========================================
   How It Works
========================================= */
.how-it-works {
    padding: 80px 20px;
    background-color: var(--surface-color);
}

.steps-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
}

.step-card {
    flex: 1;
    text-align: center;
    position: relative;
    padding: 20px;
    z-index: 2;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    margin: 0 auto 20px;
    box-shadow: var(--shadow-sm);
}

.step-icon {
    width: 80px;
    height: 80px;
    background: var(--bg-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--primary-dark);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.step-icon span {
    font-size: 36px;
}

.step-card h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.step-card p {
    color: var(--text-muted);
}

.step-line {
    flex: 0 0 100px;
    height: 2px;
    background: dashed 2px var(--border-color);
    margin-top: 60px;
    opacity: 0.5;
}

/* =========================================
   Features
========================================= */
.features {
    padding: 80px 20px;
}

.features-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--surface-color);
    padding: 40px 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.feature-icon-wrapper {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(166, 124, 82, 0.1), rgba(166, 124, 82, 0.2));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--primary-dark);
}

.feature-icon-wrapper span {
    font-size: 32px;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.feature-card p {
    color: var(--text-muted);
}

/* =========================================
   Pricing
========================================= */
.pricing {
    padding: 80px 20px;
    background-color: var(--surface-color);
}

.pricing-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-items: stretch;
}

.pricing-card {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    padding: 40px 30px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    position: relative;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.pricing-card.premium {
    border: 2px solid var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: scale(1.05);
    z-index: 2;
}

.pricing-card.premium:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.popular-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 6px 20px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(166, 124, 82, 0.3);
}

.pricing-card h3 {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 5px;
    color: var(--primary-dark);
}

.pricing-desc {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 0.95rem;
}

.price {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    margin-bottom: 30px;
    color: var(--text-main);
}

.price .currency {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    margin-left: 5px;
}

.price .amount {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
    color: var(--primary-dark);
}

.price .period {
    color: var(--text-muted);
    margin-bottom: 10px;
    margin-right: 5px;
    font-size: 0.9rem;
}

.pricing-features {
    list-style: none;
    margin-bottom: 30px;
    flex-grow: 1;
}

.pricing-features li {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-size: 1rem;
    color: var(--text-main);
}

.pricing-features li.disabled {
    color: var(--text-muted);
    opacity: 0.6;
}

.pricing-features .check {
    color: var(--primary-color);
    margin-left: 10px;
    font-size: 1.2rem;
}

.pricing-features .disabled span {
    color: #999;
    margin-left: 10px;
    font-size: 1.2rem;
}

/* Calculator Section */
.calculator-section {
    max-width: 800px;
    margin: 80px auto 0;
    text-align: center;
    background: white;
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.calculator-section h3 {
    font-size: 1.8rem;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.calculator-section > p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.calculator-box {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
}

.calc-input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.calc-input-group label {
    font-size: 1.2rem;
    font-weight: 700;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 500px;
    margin: 10px 0;
}

/* Custom Range Slider */
input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    margin-top: -10px;
    box-shadow: 0 2px 6px rgba(166, 124, 82, 0.4);
    transition: transform 0.1s;
}

input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: var(--border-color);
    border-radius: 3px;
}

input[type=range]:focus {
    outline: none;
}

.calc-input-group input[type="number"] {
    font-size: 1.5rem;
    padding: 8px 12px;
    width: 100px;
    text-align: center;
    border: 2px solid var(--primary-light);
    border-radius: var(--radius-md);
    color: var(--primary-dark);
    font-weight: 800;
    outline: none;
    transition: var(--transition);
}

.calc-input-group input[type="number"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(166, 124, 82, 0.1);
}

.calc-results {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.calc-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background: var(--bg-color);
    border-radius: var(--radius-sm);
    font-size: 1.2rem;
}

.calc-result-item.highlight-res {
    background: rgba(166, 124, 82, 0.1);
    border: 1px solid var(--primary-light);
    font-weight: 700;
}

.calc-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-dark);
}

.calc-note {
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* =========================================
   FAQ
========================================= */
.faq {
    padding: 80px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

.faq-question {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.faq-question h3 {
    font-size: 1.1rem;
    margin: 0;
}

.faq-question span {
    transition: transform 0.3s ease;
    color: var(--primary-color);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
    background: #FAFAFA;
}

.faq-answer p {
    padding: 0 20px 20px;
    color: var(--text-muted);
    margin: 0;
}

.faq-item.active {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-sm);
}

.faq-item.active .faq-question span {
    transform: rotate(180deg);
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

/* =========================================
   Footer
========================================= */
.footer-modern {
    background: #1A1A1A;
    color: #FFFFFF;
    padding: 60px 20px 20px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.brand-col .footer-logo {
    height: 50px;
    margin-bottom: 20px;
    filter: brightness(0) invert(1); /* Makes logo white if possible */
}

.brand-col p {
    color: #AAAAAA;
    max-width: 300px;
}

.footer-col h4 {
    color: #FFFFFF;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.footer-col a {
    display: block;
    color: #AAAAAA;
    margin-bottom: 10px;
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--primary-light);
    padding-right: 5px;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    border-top: 1px solid #333333;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    color: #888888;
    font-size: 0.9rem;
}

.built-with {
    color: var(--primary-light);
}

/* =========================================
   Animations
========================================= */
@keyframes float {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(20px) scale(1.05); }
}

/* =========================================
   Responsive
========================================= */
@media (max-width: 992px) {
    .pricing-container {
        grid-template-columns: 1fr;
    }
    
    .pricing-info {
        text-align: center;
        order: -1;
    }
}

@media (max-width: 768px) {
    .nav-links-main, .nav-action {
        display: none; /* In a real app, add a hamburger menu */
    }
    
    .hero h1 { font-size: 2.5rem; }
    
    .steps-grid {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .step-line {
        display: none;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .brand-col .footer-logo {
        margin: 0 auto 20px;
    }
    
    .brand-col p {
        margin: 0 auto;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    /* Mobile adjustments for the calculator */
    .calculator-section {
        padding: 25px 15px;
        margin-top: 50px;
    }
    
    .slider-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .calc-input-group input[type="number"] {
        width: 100%;
        max-width: 200px;
    }
    
    .calc-result-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        padding: 15px;
    }
    
    .calc-price {
        font-size: 1.8rem;
    }
}

/* =========================================
   Pages secondaires (blog, légales, support)
========================================= */

/* Espace sous la navbar fixe */
body > .container:first-of-type,
body > .container {
    padding-top: 100px;
}

.container {
    max-width: 860px;
    margin: 0 auto;
    padding: 100px 20px 60px;
}

.card {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    padding: 50px 50px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.card h1 {
    font-size: 2.2rem;
    color: var(--primary-dark);
    margin-bottom: 10px;
    line-height: 1.3;
}

.card h2 {
    font-size: 1.5rem;
    color: var(--primary-dark);
    margin-top: 40px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
}

.card h3 {
    font-size: 1.2rem;
    color: var(--text-main);
    margin-top: 25px;
    margin-bottom: 10px;
}

.card p {
    color: var(--text-main);
    font-size: 1.05rem;
    margin-bottom: 15px;
    line-height: 1.8;
}

.card ul,
.card ol {
    padding-right: 25px;
    margin-bottom: 20px;
}

.card li {
    margin-bottom: 10px;
    color: var(--text-main);
    line-height: 1.7;
    font-size: 1.05rem;
}

.card a {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.card a:hover {
    color: var(--primary-dark);
}

.card hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 40px 0;
}

/* Badge date / temps de lecture */
.highlight {
    display: inline-block;
    background: rgba(166, 124, 82, 0.1);
    color: var(--primary-dark);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    margin-bottom: 30px;
    border: 1px solid rgba(166, 124, 82, 0.2);
}

/* Bloc "important" / callout */
.important {
    background: rgba(166, 124, 82, 0.08);
    border-right: 4px solid var(--primary-color);
    border-radius: var(--radius-sm);
    padding: 20px 25px;
    margin: 25px 0;
}

.important p {
    margin: 0;
    color: var(--primary-dark);
    font-weight: 500;
}

/* Bouton secondaire */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: transparent;
    color: var(--primary-dark);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--bg-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Footer simple (pages secondaires) */
.footer {
    background: #1A1A1A;
    color: #AAAAAA;
    text-align: center;
    padding: 30px 20px;
    font-size: 0.9rem;
    margin-top: 60px;
}

.footer a {
    color: var(--primary-light);
    transition: var(--transition);
}

.footer a:hover {
    color: #FFFFFF;
}

/* Liens "Maamarim nosafim" en bas d'article */
.card h3 + p a {
    display: inline-block;
    margin-left: 12px;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.card h3 + p a:hover {
    text-decoration: underline;
}

/* Responsive cards */
@media (max-width: 768px) {
    .container {
        padding: 90px 15px 40px;
    }

    .card {
        padding: 30px 20px;
    }

    .card h1 {
        font-size: 1.7rem;
    }

    .card h2 {
        font-size: 1.25rem;
    }
}
