/* css/styles.css */

/* Shadcn-inspired Design System */
:root {
    /* Colors */
    --background: 222.2 84% 4.9%;
    --foreground: 210 40% 98%;
    --card: 222.2 84% 4.9%;
    --card-foreground: 210 40% 98%;
    --popover: 222.2 84% 4.9%;
    --popover-foreground: 210 40% 98%;
    --primary: 142.1 76.2% 36.3%;
    --primary-foreground: 355.7 100% 97.3%;
    --secondary: 217.2 32.6% 17.5%;
    --secondary-foreground: 210 40% 98%;
    --muted: 217.2 32.6% 17.5%;
    --muted-foreground: 215 20.2% 65.1%;
    --accent: 142.1 70.6% 45.3%;
    --accent-foreground: 355.7 100% 97.3%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 210 40% 98%;
    --border: 217.2 32.6% 17.5%;
    --input: 217.2 32.6% 17.5%;
    --ring: 142.1 76.2% 36.3%;
    --chart-1: 12 76% 61%;
    --chart-2: 173 58% 39%;
    --chart-3: 197 37% 24%;
    --chart-4: 43 74% 66%;
    --chart-5: 27 87% 67%;
    --radius: 0.5rem;
    
    /* Legacy support */
    --primary-green: hsl(var(--primary));
    --secondary-green: hsl(var(--secondary));
    --accent-green: hsl(var(--accent));
    --white: hsl(var(--foreground));
    --text-primary: hsl(var(--foreground));
    --text-secondary: hsl(var(--muted-foreground));
    --hover-color: hsl(var(--accent));
    --background-overlay: hsla(var(--background), 0.8);
    --shadow-text: 0 1px 3px rgba(0, 0, 0, 0.7);
}

/* Global Styles with Animations */
*,
*::before,
*::after {
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

/* Smooth animations for all elements */
* {
    transition: 
        transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Entrance animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px hsl(var(--primary) / 0.3); }
    50% { box-shadow: 0 0 20px hsl(var(--primary) / 0.6), 0 0 30px hsl(var(--primary) / 0.4); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

body,
html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow-x: hidden;
    color: var(--text-primary);
    background: #000;
    position: relative;
    z-index: 1;
    font-size: 16px;
    line-height: 1.6;
}

a {
    /* Global anchors will still use var(--text-color)
       but we override anchors inside markdown below */
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--hover-color);
}

/* Anchor links inside markdown content (for example in .terms-content) */
.terms-content a {
    color: #00f; /* bright blue */
}

.terms-content a:hover {
    color: #00aaff;
}

/* Header */
header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(180deg, 
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.2) 100%
    );
    backdrop-filter: blur(15px);
    position: relative;
    z-index: 10;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.header-container {
    width: 100%;
    display: flex;
    justify-content: center; /* Center the header content */
}

.header-content {
    display: flex;
    flex-direction: column; /* Stack logo above buttons */
    align-items: center;
    gap: 10px; /* Space between logo and buttons */
}

.header-center {
    display: flex;
    align-items: center;
    gap: 20px; /* Added gap for spacing */
    justify-content: center;
    direction: ltr;
    box-shadow: none; /* Removed any box-shadow if present */
}

.logo img {
    width: 150px;
    height: auto;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5)) brightness(1.1);
    transition: filter 0.3s ease;
}

.logo img:hover {
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.7)) brightness(1.2);
}

.nav-link {
    justify-content: center;
    align-items: center;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    transition: color 0.3s ease;
    margin-left: 0px; /* Adjust as needed */
}

.nav-link:hover {
    color: var(--accent-green);
    text-decoration: none;
    transform: translateY(-1px);
    text-shadow: 0 0 10px hsl(var(--accent) / 0.5);
}

/* Language Button Styling */
.language-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-primary) !important;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 500;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.language-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: var(--accent-green) !important;
    text-decoration: none;
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-link-delete {
    justify-content: center;
    align-items: center;
    color: #555;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    margin-left: 0px;
}

.nav-link-delete:hover {
    color: var(--hover-delete-color);
    text-decoration: none;
}

.language-switch {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-direction: row; /* Ensure buttons are always in a row */
}

.language-switch button {
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    color: #555;
    font-size: 1rem;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.language-switch button:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.flag-icon {
    width: 24px;
    height: 18px;
    object-fit: contain;
    vertical-align: middle;
}

/* Active Language Button */
.active-language {
    background-color: rgba(0, 0, 0, 0.1);
    color: var(--secondary-green);
}

/* Text Alignment and Directionality */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

/* Padding for Terms Page */
.padding {
    padding-left: 20px;
    padding-right: 20px;
}

@media (min-width: 768px) {
    .padding {
        padding-left: 40px;
        padding-right: 40px;
    }
}

/* Background Video */
.video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

#background-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    filter: blur(8px) brightness(1.4) contrast(1.1);
    pointer-events: none;
    display: block;
}

/* Overlay Layer */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: -1;
    pointer-events: none;
}

/* Modern Hero Section */
.hero {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 120px);
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 4rem 2rem;
    text-align: center;
    z-index: 1;
    position: relative;
    overflow: hidden;
}

/* Creative floating elements */
.hero::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 5%;
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, hsl(var(--primary) / 0.1), hsl(var(--accent) / 0.05));
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
    z-index: -1;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 15%;
    right: 8%;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, hsl(var(--accent) / 0.08), hsl(var(--primary) / 0.03));
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: float 8s ease-in-out infinite reverse;
    z-index: -1;
}

@media (max-width: 1200px) {
    .hero {
        padding: 30px 10px;
    }
}

/* Enhanced Mobile Responsive Design */
@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        margin: 0;
        padding: 40px 15px;
        min-height: auto;
    }
}

@media (max-width: 768px) {
    .hero {
        margin: 0;
        padding: 30px 10px;
    }
    
    .description {
        max-width: 100%;
        padding: 15px;
    }
    
    .description p {
        font-size: clamp(1.3rem, 5vw, 1.8rem);
        margin-bottom: 20px;
    }
    
    .content-text {
        font-size: clamp(1.1rem, 4vw, 1.4rem) !important;
        margin-bottom: 20px;
    }
}

.mockup-container {
    flex: 1.5;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInLeft 0.8s ease-out;
    position: relative;
}

.mockup-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, 
        hsl(var(--primary) / 0.15) 0%,
        hsl(var(--accent) / 0.1) 50%,
        transparent 70%
    );
    border-radius: 50%;
    z-index: -1;
    animation: pulse 4s ease-in-out infinite;
}

.mockup-container:hover {
    transform: scale(1.02);
}

.mockup-container:hover::before {
    animation: pulse 2s ease-in-out infinite, glow 2s ease-in-out infinite;
}

#iphone-mockup {
    width: 100%;
    max-width: 650px;
    transition: transform 0.3s ease;
    margin-bottom: 0px;
}

#iphone-mockup:hover {
    transform: scale(1.05);
}

.description {
    flex: 1;
    padding: 40px 20px;
    max-width: 600px;
    position: relative;
    animation: fadeInRight 0.8s ease-out 0.2s both;
    
    /* Creative gradient background with subtle glow */
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.02) 50%,
        rgba(255, 255, 255, 0.08) 100%
    );
    border-radius: 30px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.description-logo {
    max-width: 180px;
    height: auto;
    margin: 30px 0;
    transition: all 0.3s ease;
    object-fit: contain;
    aspect-ratio: auto;
    animation: fadeInUp 0.6s ease-out 0.4s both;
    filter: 
        drop-shadow(0 0 20px rgba(255, 255, 255, 0.3))
        drop-shadow(0 2px 8px rgba(34, 87, 53, 0.6))
        brightness(1.1)
        contrast(1.1);
}

.description-logo:hover {
    transform: scale(1.05);
    filter: 
        drop-shadow(0 0 30px rgba(255, 255, 255, 0.5))
        drop-shadow(0 4px 12px rgba(34, 87, 53, 0.8))
        brightness(1.15)
        contrast(1.15);
}

@media (max-width: 768px) {
    .description-logo {
        max-width: 140px;
    }
    .description p {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .hero {
        margin: 2px;
        padding: 20px 8px;
        border-radius: 12px;
    }
    
    .description-logo {
        max-width: 120px;
        margin: 20px 0;
    }
    
    #iphone-mockup {
        width: 280px;
        max-width: 90vw;
    }
    
    .description p {
        font-size: clamp(1.2rem, 5.5vw, 1.6rem);
        margin-bottom: 15px;
    }
    
    .content-text {
        font-size: clamp(1rem, 4.5vw, 1.3rem) !important;
        margin-bottom: 20px;
    }
    
    .download-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        margin-bottom: 25px;
    }
    
    .market-btn {
        width: min(280px, 85vw);
        height: 75px;
        font-size: 1rem;
        padding: 10px 15px;
        margin: 5px 0;
    }
    
    .market-button-subtitle {
        font-size: 0.85rem;
        margin-bottom: 4px;
    }
    
    .market-button-title {
        font-size: 1rem;
        font-weight: 700;
    }
    
    /* Mobile header optimizations */
    header {
        padding: 10px 15px;
    }
    
    .logo img {
        width: 120px;
    }
    
    .language-btn {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .nav-link {
        font-size: 0.9rem;
        padding: 8px 12px;
    }
}

.description p {
    text-shadow: var(--shadow-text);
    font-size: clamp(1.4rem, 4vw, 2.2rem);
    line-height: 1.6;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 30px;
    text-align: center;
    animation: fadeInUp 0.8s ease-out 0.8s both;
}

.content-text {
    font-size: clamp(1.2rem, 3.5vw, 1.8rem) !important;
    line-height: 1.7;
    color: var(--text-secondary);
    text-shadow: var(--shadow-text);
    margin-bottom: 25px;
}

/* Download Buttons */
.download-buttons {
    margin-bottom: 20px;
    margin-top: 0px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

/* Shadcn Button Component */
.market-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    border-radius: calc(var(--radius) + 2px);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    focus-visible:outline-none;
    focus-visible:ring-1;
    focus-visible:ring-ring;
    disabled:pointer-events-none;
    disabled:opacity-50;
    text-decoration: none;
    
    /* Primary variant styling */
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border: 1px solid hsl(var(--border));
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    
    /* Size large */
    min-height: 3.5rem;
    padding: 0.875rem 2rem;
    min-width: 200px;
    
    /* Enhanced styling */
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.market-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.market-btn:hover::before {
    left: 100%;
}

.market-btn:hover {
    background: hsl(var(--primary) / 0.9);
    box-shadow: 0 8px 25px -8px hsl(var(--primary) / 0.6);
    transform: translateY(-2px) scale(1.02);
    border-color: hsl(var(--primary));
    text-decoration: none;
    color: hsl(var(--primary-foreground));
}

.market-btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 4px -2px hsl(var(--primary) / 0.4);
}

/* Shadcn Button Content */
.market-button-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.market-button-subtitle {
    font-size: 0.75rem;
    color: hsl(var(--primary-foreground));
    font-weight: 500;
    opacity: 0.9;
}

.market-button-store {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Store Container */
.market-button-store {
    display: flex;
    flex-direction: row;
    align-items: center;
    direction: ltr;
}

/* Icon Styling */
.download-icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    object-fit: contain;
}

/* Store Title Styling */
.market-button-title {
    font-size: 1rem;
    font-weight: 600;
    color: hsl(var(--primary-foreground));
    line-height: 1.2;
}

/* Responsive Adjustments */
@media (max-width: 480px) {
    .market-btn {
        width: 150px;
        height: 60px;
        padding: 0.4rem 0.8rem;
    }
    .download-icon {
        width: 20px;
        height: 20px;
        margin-right: 6px;
    }
    .market-button-subtitle {
        font-size: 0.8rem;
        margin-bottom: 6px;
    }
    .market-button-title {
        font-size: 0.9rem;
    }
}

/* Accessibility Widget */
.asw-menu {
    font-family: 'Inter', sans-serif;
    position: fixed;
    right: 20px;
    top: 20px;
    border-radius: 12px;
    box-shadow: 0px 8px 40px rgba(0, 0, 0, 0.3);
    opacity: 1;
    transition: opacity 0.3s;
    z-index: 500000;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    width: 500px;
    height: calc(100% - 40px - 75px);
    display: none;
    flex-direction: column;
    color: #1f2937;
}

.asw-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px;
    height: 60px;
    font-size: 18px;
    font-weight: 700;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #1f2937;
}

.asw-menu-header > div {
    display: flex;
}

.asw-menu-header div[role="button"] {
    padding: 12px;
    cursor: pointer;
    color: #6b7280;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.asw-menu-header div[role="button"]:hover {
    background: #e5e7eb;
    color: #374151;
}

.asw-menu-content {
    overflow-y: auto;
    padding: 20px;
    background: #ffffff;
}

.asw-card {
    margin: 0 0 20px 0;
}

.asw-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.asw-btn {
    aspect-ratio: 6 / 5;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    cursor: pointer;
    line-height: 1.4;
}

.asw-btn .asw-translate {
    font-size: 15px;
}

.asw-btn .material-icons {
    margin-bottom: 16px;
}

.asw-btn:hover {
    background: #ffffff;
    border-color: #2563eb;
    color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.asw-btn.asw-selected {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    font-weight: 600;
}

.asw-btn.asw-selected:hover {
    background: #1d4ed8;
    color: #ffffff;
    border-color: #1d4ed8;
    box-shadow: 0 6px 16px rgba(29, 78, 216, 0.5);
    transform: translateY(-2px);
}

/* Accessibility Menu Button */
.asw-menu-btn {
    position: fixed;
    z-index: 500000;
    right: 20px;
    bottom: 20px;
    background: var(--accessibility-btn-bg);
    box-shadow: 0 5px 15px rgba(37, 44, 97, 0.15), 0 2px 4px rgba(93, 100, 148, 0.2);
    transition: transform 0.3s;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    cursor: pointer;
    border: 4px solid var(--white);
    outline: 4px solid var(--accessibility-btn-bg);
    text-decoration: none;
}

.asw-menu-btn:hover {
    transform: scale(1.1);
    animation: glow 1.5s ease-in-out infinite;
}

.material-icons.md-36.white {
    font-size: 36px;
    color: var(--white);
}

@media (max-width: 560px) {
    .asw-menu-btn {
        width: 38px;
        height: 38px;
        right: 15px;
        bottom: 15px;
    }
    .asw-menu-btn svg {
        width: 24px;
        height: 24px;
    }
    .asw-menu {
        width: calc(100% - 20px);
        left: 10px;
        right: 10px;
        top: 10px;
        height: calc(100vh - 20px);
        max-height: 90vh;
    }
    .asw-menu-content {
        padding: 15px;
    }
    .asw-btn {
        padding: 12px 8px;
        font-size: 12px;
    }
    .asw-btn .material-icons {
        margin-bottom: 8px;
        font-size: 20px;
    }
}

@media (max-width: 420px) {
    .asw-items {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    .asw-menu {
        width: calc(100% - 20px);
        left: 10px;
        right: 10px;
        height: calc(100vh - 20px);
    }
    .asw-btn {
        padding: 10px 6px;
        font-size: 11px;
        aspect-ratio: 1;
    }
    .asw-btn .material-icons {
        margin-bottom: 6px;
        font-size: 18px;
    }
    .asw-menu-header {
        padding: 12px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .download-buttons {
        flex-direction: column;
        align-items: center;
    }
    #iphone-mockup {
        width: 300px;
    }
    .description {
        max-width: 100%;
    }
    .market-btn {
        width: 80%;
        text-align: center;
    }
}

/* RTL Support */
[dir="rtl"] .language-switch {
    flex-direction: row;
    direction: ltr;
}
[dir="rtl"] .download-buttons {
    flex-direction: ltr;
    direction: rtl;
}
[dir="rtl"] .description {
    padding-left: 40px;
    padding-right: 0;
    text-align: center;
    flex-direction: ltr;
    direction: rtl;
}
[dir="rtl"] .hero {
    direction: ltr;
}

/* Terms Section */
.terms {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
    padding: 50px 20px;
    text-align: left;
    min-height: 100vh;
    color: #fff;
    background: rgba(0, 0, 0, 0.3);
    box-shadow: none;
}
[dir="rtl"] .terms {
    text-align: right;
    display: rtl;
    padding-right: 40px;
}

/* Terms Content Styling */
.terms-content {
    padding: 20px;
    line-height: 1.6;
    white-space: pre-wrap; /* Preserve original line breaks */
}

/* Make headings inside terms-content larger than body text */
.terms-content h1 { 
    font-size: 2.2em; 
    margin: 1em 0; 
}

/* Updated h2: Increase font size for text created with "##" */
.terms-content h2 { 
    font-size: 2.8em !important;
    margin: 1em 0; 
}

.terms-content h3 { 
    font-size: 1.6em; 
    margin: 0.8em 0; 
}

.terms-content h4 { 
    font-size: 1.4em; 
    margin: 0.7em 0; 
}

.terms-content strong {
    font-weight: bold !important;
}

/* Improved Flag Icons */
.flag-icon {
    width: 24px;
    height: 18px;
    object-fit: contain;
    vertical-align: middle;
}

/* Accessibility Features */
/* Letter Spacing */
html.letter-spacing-enabled {
    letter-spacing: 0.1em;
}
/* Dyslexic Font */
html.dyslexic-font-enabled {
    font-family: 'OpenDyslexic3', Arial, sans-serif;
}
/* Highlight Links */
html.highlight-links-enabled a,
html.highlight-links-enabled button {
    text-decoration: underline;
    font-weight: 800;
    font-size: 110%;
    color: #ff0000;
}
/* Highlight Headings */
html.highlight-headings-enabled h1,
html.highlight-headings-enabled h2,
html.highlight-headings-enabled h3 {
    text-decoration: underline;
    color: #ff0000;
}
/* Line Height */
html.line-height-enabled {
    line-height: 2;
}
/* Font Weight Accessibility: force all text bold when enabled */
html.font-weight-enabled,
html.font-weight-enabled * {
    font-weight: 800 !important;
}
/* Contrast */
html.contrast-enabled {
    background-color: #0000ff; /* Blue background */
    color: #ffff00; /* Yellow text */
}
html.contrast-enabled a,
html.contrast-enabled button {
    color: #ffff00;
}
html.contrast-enabled header {
    background: #0000ff;
}
html.contrast-enabled .overlay {
    background: rgba(0, 0, 255, 0.3);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-direction: row;
}

/* Remove RTL direction changes for header actions */
[dir="rtl"] .language-switch,
[dir="rtl"] .header-actions {
    flex-direction: row;
    direction: ltr;
}

/* Delete Account Section */
.delete-account-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #000000;
    background: transparent;
    min-height: 5vh;
}
.delete-account-content {
    max-width: 800px;
    margin-bottom: 30px;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    max-height: 60vh;
}
.delete-account-button-container {
    text-align: center;
}
#delete-account-button {
    padding: 15px 30px;
    font-size: 1.2rem;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
#delete-account-button:hover {
    background-color: #c82333;
}

/* Desktop Deletion Info */
.desktop-deletion-info {
    max-width: 800px;
    margin-top: 30px;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}
.desktop-deletion-info h3 {
    margin-bottom: 15px;
}
.desktop-deletion-info p {
    margin-bottom: 15px;
}
.desktop-deletion-info a {
    color: #c69a17;
    text-decoration: underline;
}
.desktop-deletion-info a:hover {
    color: #ffdd57;
}
@media (max-width: 768px) {
    .delete-account-content {
        max-width: 100%;
        padding: 15px;
    }
    #delete-account-button {
        width: 100%;
        font-size: 1rem;
    }
    .desktop-deletion-info {
        display: none;
    }
}
.desktop-deletion-info {
    text-align: left;
}
[dir="rtl"] .desktop-deletion-info {
    text-align: right;
    direction: rtl;
    display: rtl;
}
.desktop-deletion-info a {
    margin-left: 5px;
}
[dir="rtl"] .desktop-deletion-info a {
    margin-left: 0;
    margin-right: 5px;
}

/* RTL support for markdown */
[dir="rtl"] .markdown-content {
    text-align: right;
    direction: rtl;
    display: rtl;
}
[dir="rtl"] .terms-content {
    text-align: right;
    direction: rtl;
}
[dir="ltr"] .terms-content {
    text-align: left;
    direction: ltr;
}

/* --- Accessibility Additional Configurations --- */
/* Big Cursor */
html.big-cursor-enabled {
    cursor: url('images/big-cursor.png') 16 16, auto;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* --- Policy Bottom Bar Styles --- */
/* This bar appears fixed at the bottom and contains buttons for Consent Preferences and policy links. */
.policy-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--accessibility-bg);
    border-top: 1px solid #dedede;
    padding: 10px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 500000;
}
.policy-bottom-bar a,
.policy-bottom-bar button {
    margin: 0 10px;
    padding: 8px 16px;
    background: var(--secondary-green);
    color: var(--white);
    border: none;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s;
}
.policy-bottom-bar a:hover,
.policy-bottom-bar button:hover {
    background: var(--hover-color);
}
/* --- Policy Bottom Bar Styles --- */
.policy-bottom-bar {
    position: relative; /* Not fixed – will appear at the bottom of the document */
    width: 100%;
    background: var(--accessibility-bg);
    border-top: 1px solid #dedede;
    padding: 10px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
  }
  
  .policy-bottom-bar a,
  .policy-bottom-bar button {
    margin: 0 10px;
    padding: 8px 16px;
    background: var(--secondary-green);
    color: var(--white);
    border: none;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s;
  }
  
  .policy-bottom-bar a:hover,
  .policy-bottom-bar button:hover {
    background: #1b3a1c98;
  }
  
  /* --- Modal Styles for Policy Embeds --- */
  #policy-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 500001;
    justify-content: center;
    align-items: center;
  }
  
  #policy-modal .modal-content {
    background: #fff;
    padding: 20px;
    max-width: 800px;
    width: 90%;
    position: relative;
    border-radius: 4px;
  }
  
  #policy-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #f1f1f1;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
  }
  /* --- Policy Bottom Bar Styles --- */
.policy-bottom-bar {
    position: relative;  /* Part of the normal document flow */
    width: 100%;
    background: #f9f9f922; /* Transparent background */
    border-top: none;
    padding: 10px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
  }
  
  .policy-bottom-bar a {
    margin: 0 10px;
    padding: 8px 16px;
    background: transparent;
    color: var(--secondary-green);
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.3s;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
  }
  
  .policy-bottom-bar a:hover {
    color: var(--primary-green);
    text-decoration: none;
  }
  
  /* --- Increase h2 size for Markdown headings (##) --- */
  .terms-content h2 { 
    font-size: 2.8em !important;
    margin: 1em 0;
  }
  .privacy-btn {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1); /* same background as delete account button */
    color: #555;
    padding: 15px 30px;
    font-size: 1.2rem;
    border: none;
    border-radius: 20px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  
  .privacy-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
  }
  
  