/* Landing Page Styles - Persian/RTL Support */

/* Yekan Font (loaded via CDN) */

.hero-section {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

.hero-background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

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

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 4rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.logo-hero {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 8px;
    margin-bottom: 4rem;
    text-align: left;
    font-family: 'B Yekan', 'Yekan', sans-serif;
}

.hero-text {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    gap: 3rem;
    margin-top: 4rem;
}

.hero-headline {
    font-size: 3.5rem;
    font-weight: 700;
    color: #3d2817;
    line-height: 1.3;
    max-width: 500px;
    direction: rtl;
    text-align: right;
    font-family: 'B Yekan', 'Yekan', sans-serif;
}

.btn-hero {
    background: #3d2817;
    color: #f5f1e8;
    padding: 1.2rem 3rem;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 600;
    transition: all 0.3s ease;
    direction: rtl;
    font-family: 'B Yekan', 'Yekan', sans-serif;
    display: inline-block;
}

.btn-hero:hover {
    background: #2d1f12;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(61, 40, 23, 0.3);
}

/* Help Section */
.help-section {
    padding: 5rem 2rem;
    background: #ffffff;
}

.help-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.help-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 2rem;
}

.help-text {
    margin-right: 2rem;
}

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

.image-placeholder {
    font-size: 5rem;
    color: #ccc;
    display: none;
}

.help-image img[style*="display: none"] ~ .image-placeholder {
    display: block;
}

.help-text {
    direction: rtl;
    text-align: center;
}

.help-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #3d2817;
    margin-bottom: 2rem;
    direction: rtl;
    text-align: center;
    font-family: 'B Yekan', 'Yekan', sans-serif;
}

.help-paragraph {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 2rem;
    direction: rtl;
    text-align: center;
    font-family: 'B Yekan', 'Yekan', sans-serif;
}

.help-box {
    background: #f9f9f9;
    border: 2px solid #e8ddd4;
    border-radius: 12px;
    padding: 1.5rem;
    direction: rtl;
    text-align: center;
}

.help-box p {
    font-size: 1rem;
    line-height: 1.8;
    color: #666;
    margin: 0;
    direction: rtl;
    font-family: 'B Yekan', 'Yekan', sans-serif;
}

/* Habits Section */
.habits-section {
    background: #3d2817;
    padding: 5rem 2rem;
    color: #f5f1e8;
    width: 100%;
    overflow-x: hidden; /* Prevent horizontal overflow */
    box-sizing: border-box;
}

.habits-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.habits-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-areas: 
        "title image"
        "description image";
    gap: 4rem;
    align-items: start;
    direction: ltr; /* Override RTL for this grid to get left-right positioning */
    width: 100%;
    box-sizing: border-box;
}

.habits-title {
    grid-area: title;
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    line-height: 1.8;
    direction: rtl;
    text-align: right;
    font-family: 'B Yekan', 'Yekan', sans-serif;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    text-rendering: optimizeLegibility;
    max-width: 100%;
    box-sizing: border-box;
}

.habits-description {
    grid-area: description;
    font-size: 1.2rem;
    line-height: 1.9;
    direction: rtl;
    text-align: right;
    font-family: 'B Yekan', 'Yekan', sans-serif;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    text-rendering: optimizeLegibility;
    max-width: 100%;
    box-sizing: border-box;
}

.habits-image {
    grid-area: image;
    width: 100%;
    box-sizing: border-box;
    align-self: center;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    background: #2d1f12;
}

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

/* Recognize Section */
.recognize-section {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.recognize-image {
    width: 100%;
    height: 100%;
    position: relative;
    background: linear-gradient(135deg, #a8d5e2 0%, #85c1e2 100%);
}

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

.image-placeholder-recognize {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 5rem;
    color: #ccc;
    display: none;
}

.recognize-image img[style*="display: none"] ~ .image-placeholder-recognize {
    display: block;
}

.recognize-overlay {
    position: absolute;
    top: 70%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(245, 241, 232, 0.6);
    padding: 1rem 2rem;
    border-radius: 20px;
    border: 2.5px solid rgba(61, 40, 23, 0.6);
    max-width: 280px;
    width: 60%;
    direction: rtl;
    text-align: center;
    text-decoration: none;
    display: block;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 25px rgba(61, 40, 23, 0.25), 
                0 0 0 1px rgba(61, 40, 23, 0.1);
    animation: subtle-pulse 3s ease-in-out infinite;
}

@keyframes subtle-pulse {
    0%, 100% {
        box-shadow: 0 5px 25px rgba(61, 40, 23, 0.25), 
                    0 0 0 1px rgba(61, 40, 23, 0.1);
    }
    50% {
        box-shadow: 0 5px 30px rgba(61, 40, 23, 0.35), 
                    0 0 0 2px rgba(61, 40, 23, 0.15);
    }
}

.recognize-overlay:hover {
    background: rgba(245, 241, 232, 0.9);
    border: 3px solid rgba(61, 40, 23, 0.9);
    transform: translate(-50%, -50%) translateY(-10px) scale(1.1);
    box-shadow: 0 15px 50px rgba(61, 40, 23, 0.5),
                0 0 0 3px rgba(61, 40, 23, 0.2);
    animation: none;
}

.recognize-overlay:active {
    transform: translate(-50%, -50%) translateY(-4px) scale(1.05);
    box-shadow: 0 8px 30px rgba(61, 40, 23, 0.4),
                0 0 0 2px rgba(61, 40, 23, 0.3);
}

.recognize-overlay p {
    font-size: 1.3rem;
    font-weight: 700;
    color: #3d2817;
    margin: 0.3rem 0;
    direction: rtl;
    font-family: 'B Yekan', 'Yekan', sans-serif;
    line-height: 1.4;
}

.recognize-overlay:link,
.recognize-overlay:visited,
.recognize-overlay:active {
    color: #3d2817;
}

.overlay-line1,
.overlay-line2 {
    line-height: 1.4;
}

/* Footer Section */
.footer-section {
    background: #3d2817;
    padding: 4rem 2rem;
    color: #f5f1e8;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.footer-column {
    direction: rtl;
    text-align: right;
}

.footer-left {
    order: 1;
}

.footer-right {
    order: 2;
}

.footer-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 2rem;
    direction: rtl;
    font-family: 'B Yekan', 'Yekan', sans-serif;
}

.footer-contact p,
.footer-social {
    font-size: 1.1rem;
    line-height: 2;
    direction: rtl;
    font-family: 'B Yekan', 'Yekan', sans-serif;
}

.social-link {
    color: #f5f1e8;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.social-link:hover {
    color: #e8ddd4;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content {
        padding: 2rem 1.75rem 3rem;
        justify-content: center;
        align-items: center;
        position: relative;
    }
    
    .logo-hero {
        font-size: 2rem;
        margin-bottom: 0;
        margin-top: 0;
        position: absolute;
        top: calc(env(safe-area-inset-top, 0px) + 1.25rem);
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        text-align: center;
    }
    
    .hero-text {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
        text-align: center;
        margin-bottom: 0;
        margin-top: 5rem;
    }
    
    .hero-headline {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .btn-hero {
        padding: 1rem 2rem;
        font-size: 1.1rem;
        margin-top: 2rem;
    }
    
    .help-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .help-image {
        margin-left: 0;
    }
    
    .help-text {
        margin-right: 0;
    }
    
    /* Habits Section Mobile Fixes */
    .habits-section {
        padding: 3rem 1.5rem;
    }
    
    .habits-container {
        padding: 0;
    }
    
    .habits-content {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "title"
            "image"
            "description";
        gap: 2.5rem;
        direction: rtl; /* Restore RTL for mobile */
        display: grid;
    }
    
    .habits-title {
        grid-area: title;
        font-size: 1.4rem;
        line-height: 1.7;
        word-wrap: break-word;
        word-break: break-word;
        overflow-wrap: break-word;
        white-space: normal;
        hyphens: auto;
        margin-bottom: 1.5rem;
        padding: 0;
    }
    
    .habits-image {
        grid-area: image;
        width: 100%;
        max-width: 100%;
        aspect-ratio: 4/3; /* Better aspect ratio for mobile */
        margin: 0 auto;
    }
    
    .habits-description {
        grid-area: description;
        font-size: 1rem;
        line-height: 1.8;
        word-wrap: break-word;
        word-break: break-word;
        overflow-wrap: break-word;
        white-space: normal;
        padding: 0;
        margin: 0;
    }
    
    .recognize-overlay {
        position: absolute;
        top: 60%;
        left: 50%;
        transform: translate(-50%, -50%);
        max-width: 75%;
        width: 65%;
        padding: 1rem 1.5rem;
        background: rgba(245, 241, 232, 0.6);
    border: 2.5px solid rgba(61, 40, 23, 0.6);
        text-align: center;
        box-shadow: 0 4px 20px rgba(61, 40, 23, 0.25);
    }
    
    .recognize-overlay:hover {
        transform: translate(-50%, -50%) translateY(-8px) scale(1.08);
        background: rgba(245, 241, 232, 0.9);
    border: 3px solid rgba(61, 40, 23, 0.9);
        box-shadow: 0 12px 40px rgba(61, 40, 23, 0.45);
    }
    
    .recognize-overlay:active {
        transform: translate(-50%, -50%) translateY(-3px) scale(1.03);
        box-shadow: 0 6px 25px rgba(61, 40, 23, 0.35);
    }
    
    .recognize-overlay p {
        font-size: 1rem;
        margin: 0.25rem 0;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-left {
        order: 1;
    }
    
    .footer-right {
        order: 2;
    }

    .footer-title {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .hero-content {
        padding: 1.75rem 1.25rem 2.5rem;
        justify-content: center;
        align-items: center;
        position: relative;
    }
    
    .logo-hero {
        margin-bottom: 1rem;
        margin-top: 0;
        position: absolute;
        top: calc(env(safe-area-inset-top, 0px) + 1rem);
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        text-align: center;
        margin-bottom: 0;
    }
    
    .hero-text {
        margin-bottom: 1rem;
        margin-top: 4.75rem;
        gap: 1.25rem;
        align-items: center;
        text-align: center;
    }
    
    .hero-headline {
        font-size: 1.7rem;
        margin-bottom: 0.5rem;
        line-height: 1.35;
        text-align: center;
    }
    
    .btn-hero {
        margin-top: 0.5rem;
    }
    
    .habits-section {
        padding: 2rem 1rem;
    }
    
    .habits-content {
        gap: 2rem;
    }
    
    .habits-title {
        font-size: 1.2rem;
        line-height: 1.6;
        margin-bottom: 1rem;
    }
    
    .habits-description {
        font-size: 0.95rem;
        line-height: 1.7;
    }
    
    .habits-image {
        aspect-ratio: 1; /* Square on very small screens */
    }
    
    .recognize-overlay {
        position: absolute;
        top: 60%;
        left: 50%;
        transform: translate(-50%, -50%);
        max-width: 80%;
        width: 70%;
        padding: 0.9rem 1.3rem;
        background: rgba(245, 241, 232, 0.6);
    border: 2px solid rgba(61, 40, 23, 0.4);
        text-align: center;
    }
    
    .recognize-overlay:hover {
        transform: translate(-50%, -50%) translateY(-5px) scale(1.04);
        background: rgba(245, 241, 232, 0.85);
    border: 2.5px solid rgba(61, 40, 23, 0.8);
        box-shadow: 0 8px 30px rgba(61, 40, 23, 0.3);
    }
    
    .recognize-overlay:active {
        transform: translate(-50%, -50%) translateY(-2px) scale(1.01);
    }
    
    .recognize-overlay p {
        font-size: 0.95rem;
        margin: 0.2rem 0;
    }

    .footer-title {
        font-size: 1.1rem;
    }
}

/* RTL Support for Persian Text */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

/* Override base container for landing page */
body.landing-page {
    background: #ffffff;
    font-family: 'B Yekan', 'Yekan', sans-serif;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

body.landing-page .container {
    padding: 0;
    max-width: 100%;
    min-height: 100vh;
    display: block;
    width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Fix image placeholder display */
.help-image img[style*="display: none"] + .image-placeholder,
.help-image:has(img[style*="display: none"]) .image-placeholder {
    display: block;
}

.habits-image img[style*="display: none"] + .image-placeholder,
.habits-image:has(img[style*="display: none"]) .image-placeholder {
    display: block;
    color: #f5f1e8;
    font-size: 4rem;
}

.recognize-image img[style*="display: none"] + .image-placeholder-recognize,
.recognize-image:has(img[style*="display: none"]) .image-placeholder-recognize {
    display: block;
}

/* eNamad Trust Seal */
.enamad-seal {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
}

.enamad-seal img {
    max-width: 100px;
    height: auto;
    display: block;
}

/* Responsive adjustments for eNamad seal */
@media (max-width: 768px) {
    .enamad-seal {
        bottom: 10px;
        left: 10px;
    }
    
    .enamad-seal img {
        max-width: 80px;
    }
}

