/* 
==============================================
   PureAqua Landing Page CSS
==============================================
*/

/* 1. CSS Variables & Reset */
:root {
    --primary: #005BAA;
    --secondary: #4F6EF7;
    --bg-white: #FFFFFF;
    --bg-light: #F8FAFC;
    --text-dark: #1E293B;
    --text-medium: #475569;
    --text-light: #94A3B8;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    --radius-md: 0.5rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    --transition: all 0.3s ease-in-out;
}

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

html {
    font-family: 'Tajawal', sans-serif;
    overflow-x: hidden;
    width: 100%;
}

body {
    background-color: var(--bg-white);
    color: var(--text-medium);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    width: 100%;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-dark);
    font-weight: 700;
    line-height: 1.3;
}

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

ul {
    list-style: none;
}

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

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

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.section-title p {
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* 2. Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-white);
    z-index: 1000;
    transition: var(--transition);
    padding: 1rem 0;
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
    padding: 0.75rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo-img {
    height: 55px;
    display: block;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-dark);
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lang-toggle {
    background: transparent;
    border: 1px solid var(--text-light);
    color: var(--text-dark);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.lang-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-dark);
    cursor: pointer;
}

/* 3. Hero Section */
.hero {
    padding: 150px 0 80px;
    background: linear-gradient(135deg, rgba(255,255,255,1) 0%, rgba(79,110,247,0.25) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.hero-content h1 span {
    color: var(--primary);
    position: relative;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    color: var(--text-medium);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.store-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: var(--text-dark);
    color: var(--bg-white);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.store-btn:hover {
    background-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.store-btn i {
    font-size: 2rem;
}

.btn-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.2;
}

.btn-text span {
    font-size: 0.7rem;
    font-weight: 400;
}

.btn-text strong {
    font-size: 1.1rem;
    font-weight: 700;
}

/* Floating animation for hero image */
.floating-mockup {
    animation: float 6s ease-in-out infinite;
    max-height: 600px;
    margin: 0 auto;
    filter: drop-shadow(0 25px 40px rgba(0, 91, 170, 0.25));
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* 4. Order Types Section */
.order-types {
    padding: 100px 0;
    background-color: var(--bg-white);
}

.order-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.order-card {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    position: relative;
    overflow: hidden;
}

.order-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--primary);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.4s ease;
}

.order-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.order-card:hover::after {
    transform: scaleX(1);
}

.order-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    color: var(--bg-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1.5rem;
}

.order-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-weight: 700;
}

.order-card p {
    color: var(--text-medium);
    line-height: 1.6;
}

/* 5. Features Bento Box */
.features {
    padding: 100px 0;
    background-color: var(--bg-light);
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 1.5rem;
}

.bento-item {
    background-color: var(--bg-white);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-md);
    padding: 2.5rem;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.bento-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.bento-large {
    grid-column: span 2;
    grid-row: span 2;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--bg-white);
}

.bento-large h3 {
    color: var(--bg-white);
    font-size: 2rem;
}

.bento-large p {
    color: rgba(255,255,255,0.9);
    font-size: 1.2rem;
}

.bento-large .bento-icon {
    color: var(--bg-white);
    background: rgba(255,255,255,0.2);
}

.bento-medium {
    grid-column: span 2;
}

.bento-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(79, 110, 247, 0.1);
    color: var(--primary);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.bento-content h3 {
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
}

/* 6. How It Works */
.how-it-works {
    padding: 100px 0;
    background-color: var(--bg-white);
}

.steps-container {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-top: 4rem;
}

.step-line {
    position: absolute;
    top: 40px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: linear-gradient(to left, rgba(0,91,170,0.1), var(--secondary), rgba(0,91,170,0.1));
    z-index: 1;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 2;
    padding: 0 1rem;
}

.step-number {
    width: 40px;
    height: 40px;
    background-color: var(--secondary);
    color: var(--bg-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.25rem;
    margin: 0 auto 1.5rem;
    position: relative;
    box-shadow: 0 0 0 10px var(--bg-white), var(--shadow-md);
}

.step-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.step h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.step p {
    font-size: 0.95rem;
}

/* 7. CTA Section */
.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--bg-white);
    text-align: center;
}

.cta-container {
    max-width: 800px;
    margin: 0 auto;
}

.cta-logo-img {
    height: 160px;
    max-width: 100%;
    margin-bottom: 2rem;
    display: inline-block;
    background-color: var(--bg-white);
    padding: 1rem 2rem;
    border-radius: 50%;
    box-shadow: var(--shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04));
}

.cta-section h2 {
    color: var(--bg-white);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 2.5rem;
}

.cta-buttons {
    justify-content: center;
}

.cta-buttons .store-btn {
    background-color: var(--bg-white);
    color: var(--primary);
}

.cta-buttons .store-btn:hover {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

/* 8. FAQ Section */
.faq {
    padding: 100px 0;
    background-color: var(--bg-light);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background-color: var(--bg-white);
    border-radius: var(--radius-xl);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
}

.faq-item.active {
    border-right: 4px solid var(--primary);
}

.faq-question {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

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

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

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

.faq-answer {
    padding: 0 2rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 0 2rem 1.5rem;
    max-height: 500px;
}

/* 8. Contact Section */
.contact-section {
    padding: 100px 0;
    background-color: var(--bg-white);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.contact-text h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.contact-text p {
    font-size: 1.125rem;
    color: var(--text-medium);
    margin-bottom: 2.5rem;
}

.contact-details-box {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-detail {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cd-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(79, 110, 247, 0.1);
    color: var(--primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.cd-info h3 {
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.cd-info p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-medium);
}

.contact-form-container {
    background-color: var(--bg-white);
    padding: 3rem;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0,0,0,0.03);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem;
    border: 1px solid #E2E8F0;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--bg-light);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 91, 170, 0.1);
    background-color: var(--bg-white);
}

.form-group select {
    appearance: none;
    cursor: pointer;
    /* A select's intrinsic content box is shorter than an input's line box;
       pin it to the same 19px so both fields end up the same height. */
    line-height: 1.1875;
    padding-inline-end: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 1.1rem;
    background-position: left 1rem center;
}

html[lang="en"] .form-group select {
    background-position: right 1rem center;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary);
    color: var(--bg-white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.submit-btn:hover {
    background-color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* 9. Footer */
footer {
    background-color: var(--primary);
    color: var(--bg-white);
    padding: 80px 0 0;
}

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

.footer-logo {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.footer-col p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 2rem;
    max-width: 400px;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--bg-white);
    color: var(--primary);
    transform: translateY(-3px);
}

.footer-col h3 {
    color: var(--bg-white);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.footer-col ul li {
    margin-bottom: 1rem;
}

.footer-col ul li a {
    color: rgba(255,255,255,0.8);
}

.footer-col ul li a:hover {
    color: var(--bg-white);
    padding-right: 10px;
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: rgba(255,255,255,0.8);
}

.contact-info li i {
    color: var(--bg-light);
    width: 20px;
}

.footer-bottom {
    background-color: rgba(0,0,0,0.1);
    padding: 1.5rem 0;
    text-align: center;
    color: rgba(255,255,255,0.7);
}

/* 11. Sub Pages */
.page-header {
    padding: 150px 0 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    text-align: center;
    color: var(--bg-white);
}

.page-header h1 {
    font-size: 3rem;
    color: var(--bg-white);
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.page-content {
    padding: 80px 0;
    background-color: var(--bg-white);
}

.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.content-wrapper h2 {
    font-size: 2rem;
    color: var(--primary);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.content-wrapper h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.content-wrapper p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-medium);
}

.content-wrapper ul, .content-wrapper ol {
    margin-bottom: 1.5rem;
    padding-right: 1.5rem;
}

.content-wrapper li {
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    color: var(--text-medium);
}

/* The rich-text editor stores list items as <li><p>…</p></li>, so drop the
   paragraph's own spacing inside a list item and let the <li> rule own it. */
.content-wrapper li > p {
    margin: 0;
    font-size: inherit;
    color: inherit;
}

/* Elements the rich-text editor can insert: images, tables, quotes, rules. */
.content-wrapper img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.content-wrapper table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.content-wrapper th,
.content-wrapper td {
    border: 1px solid #d8e2ec;
    padding: 0.65rem 0.9rem;
    text-align: inherit;
}

.content-wrapper th {
    background: #f1f6fb;
    font-weight: 700;
    color: var(--text-dark, #0f172a);
}

.content-wrapper blockquote {
    border-inline-start: 4px solid var(--primary, #005baa);
    background: #f6fafd;
    padding: 0.9rem 1.2rem;
    margin: 0 0 1.5rem;
    color: var(--text-medium);
}

.content-wrapper blockquote p:last-child { margin-bottom: 0; }

.content-wrapper hr {
    border: 0;
    border-top: 1px solid #e2e8f0;
    margin: 2rem 0;
}

.content-wrapper mark {
    background: #fff3bf;
    padding: 0 0.2rem;
    border-radius: 3px;
}

/* Wide tables must scroll rather than break the page on phones. */
@media (max-width: 640px) {
    .content-wrapper table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* 12. Responsive Design */
@media (max-width: 1024px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .order-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .bento-large {
        grid-column: span 2;
        grid-row: span 1;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; /* Hide on mobile, need JS toggle */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-white);
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: var(--shadow-md);
        text-align: center;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .floating-mockup {
        max-height: 400px;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .bento-grid {
        grid-template-columns: 1fr;
    }
    
    .bento-large, .bento-medium {
        grid-column: span 1;
    }
    
    .steps-container {
        flex-direction: column;
        gap: 3rem;
    }
    
    .step-line {
        display: none;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-form-container {
        padding: 2rem;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .store-btn {
        justify-content: center;
    }
}

/* ==========================================================================
   Admin-managed page copy
   Pages whose text comes from the database render both languages, and the
   <html lang> attribute that i18n.js sets decides which one is shown.
   ========================================================================== */
[data-lang] {
    display: none;
}

html[lang="ar"] [data-lang="ar"],
html[lang="en"] [data-lang="en"] {
    display: block;
}
