/* ============================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   Change colors here to match your brand
   ============================================ */
:root {
    /* Primary Colors */
    --cta-green: #10B981;
    --cta-green-hover: #059669;
    --cta-green-active: #047857;
    
    /* Neutral Colors */
    --text-dark: #1F2937;
    --text-medium: #4B5563;
    --text-light: #6B7280;
    --bg-white: #FFFFFF;
    --bg-light: #F9FAFB;
    --bg-off-white: #F3F4F6;
    --border-color: #E5E7EB;
    
    /* Spacing Scale */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Font Sizes */
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    
    /* Max width for content */
    --container-max: 64rem;
}

/* ============================================
   CSS RESET - Clean, consistent baseline
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: var(--text-base);
    line-height: 1.8;
    color: var(--text-dark);
    background-color: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    direction: rtl;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

strong {
    font-weight: 700;
}

/* ============================================
   LAYOUT - Container
   ============================================ */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
}

/* ============================================
   BUTTONS - The Green CTA
   ============================================ */
.cta-button {
    display: inline-block;
    padding: var(--space-md) var(--space-2xl);
    background-color: var(--cta-green);
    color: #FFFFFF;
    font-size: var(--text-xl);
    font-weight: 700;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    text-align: center;
    min-height: 56px;
    min-width: 220px;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    box-shadow: var(--shadow-md);
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    letter-spacing: 0.5px;
}

.cta-button:hover {
    background-color: var(--cta-green-hover);
    box-shadow: var(--shadow-lg);
}

.cta-button:active {
    background-color: var(--cta-green-active);
    transform: scale(0.98);
}

.cta-button:focus-visible {
    outline: 3px solid var(--cta-green);
    outline-offset: 3px;
}

/* Secondary CTA (bottom of page) */
.cta-button--secondary {
    display: block;
    margin: var(--space-xl) auto 0;
    width: 100%;
    max-width: 420px;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    padding-top: var(--space-3xl);
    padding-bottom: var(--space-2xl);
    text-align: center;
    background-color: var(--bg-white);
}

.hero__headline {
    font-size: var(--text-3xl);
    line-height: 1.5;
    margin-bottom: var(--space-md);
    color: var(--text-dark);
}

.hero__subheadline {
    font-size: var(--text-lg);
    color: var(--text-medium);
    margin-bottom: var(--space-xl);
}

.hero__trust-text {
    margin-top: var(--space-lg);
    font-size: var(--text-base);
    color: var(--cta-green);
    font-weight: 700;
}

/* ============================================
   IMAGE GALLERY SECTION
   ============================================ */
.gallery {
    padding-top: var(--space-2xl);
    padding-bottom: var(--space-2xl);
    background-color: var(--bg-light);
}

.gallery__title {
    font-size: var(--text-2xl);
    text-align: center;
    margin-bottom: var(--space-xl);
    color: var(--text-dark);
}

.gallery__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
}

.gallery__image {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    object-fit: cover;
    aspect-ratio: 1 / 1;
    background-color: var(--bg-off-white);
}

/* ============================================
   PRODUCT INFO SECTION
   ============================================ */
.product-info {
    padding-top: var(--space-2xl);
    padding-bottom: var(--space-3xl);
    background-color: var(--bg-white);
}

.product-info__title {
    font-size: var(--text-2xl);
    text-align: center;
    margin-bottom: var(--space-lg);
    color: var(--text-dark);
}

.product-info__description {
    color: var(--text-medium);
    margin-bottom: var(--space-xl);
    text-align: center;
}

.product-info__description p {
    margin-bottom: var(--space-md);
}

.product-info__description p:last-child {
    margin-bottom: 0;
}

/* Features list */
.product-info__features {
    margin-bottom: var(--space-xl);
    padding: 0;
}

.product-info__feature {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-sm);
    font-size: var(--text-lg);
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-color);
}

.product-info__feature:last-child {
    border-bottom: none;
}

.feature-icon {
    flex-shrink: 0;
    font-size: var(--text-xl);
    margin-left: var(--space-sm);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
    background-color: var(--bg-light);
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer__text {
    font-size: var(--text-base);
    color: var(--text-medium);
    margin-bottom: var(--space-sm);
}

.footer__link {
    color: var(--cta-green);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    margin-right: var(--space-xs);
}

.footer__link:hover {
    color: var(--cta-green-hover);
}

.footer__copyright {
    font-size: var(--text-sm);
    color: var(--text-light);
    margin-top: var(--space-md);
}

/* ============================================
   MODAL (Tally Form)
   ============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.is-visible {
    display: flex;
}

.modal__overlay {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    cursor: pointer;
}

.modal__content {
    position: relative;
    width: 92%;
    max-width: 600px;
    max-height: 85vh;
    background-color: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    z-index: 1001;
    padding: var(--space-lg);
    animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal__close {
    position: absolute;
    top: var(--space-sm);
    left: var(--space-sm);
    width: 44px;
    height: 44px;
    font-size: 1.8rem;
    line-height: 1;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1002;
    transition: background-color 0.2s ease;
}

.modal__close:hover {
    background-color: var(--bg-off-white);
    color: var(--text-dark);
}

.modal__close:focus-visible {
    outline: 2px solid var(--text-dark);
    outline-offset: 2px;
}

/* Prevent body scrolling when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Tally form container inside modal */
#tally-form-container {
    min-height: 400px;
}

/* ============================================
   RESPONSIVE - Tablet and up
   ============================================ */
@media (min-width: 640px) {
    .hero__headline {
        font-size: var(--text-4xl);
    }
    
    .gallery__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-info__description {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .product-info__features {
        max-width: 550px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ============================================
   RESPONSIVE - Desktop
   ============================================ */
@media (min-width: 1024px) {
    .gallery__grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .hero {
        padding-top: var(--space-3xl);
        padding-bottom: var(--space-3xl);
    }
}

/* ============================================
   RTL (ARABIC) SPECIFIC FIXES
   ============================================ */
[dir="rtl"] .feature-icon {
    margin-left: var(--space-sm);
    margin-right: 0;
}

[dir="rtl"] .modal__close {
    right: auto;
    left: var(--space-sm);
}

[dir="rtl"] .footer__link {
    margin-right: var(--space-xs);
    margin-left: 0;
}
