/* 
 * MakeNessAI - Main Stylesheet
 * Created: June 2025
 */

:root {
  --primary-color: #0052cc;
  --secondary-color: #003d99;
  --accent-color: #ff6b00;
  --text-color: #333;
  --light-bg: #f9f9f9;
  --dark-bg: #333;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
}

header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #fff;
  padding: 30px 20px;
  text-align: center;
  position: relative;
}

header h1 {
  margin: 0;
  font-size: 3em;
  letter-spacing: -0.5px;
}

header p {
  font-size: 1.3em;
  margin: 10px 0 0;
}

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

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
    position: relative;
}

.language-selector {
    position: absolute;
    top: 20px;
    right: 20px;
}

.language-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.language-btn:hover {
    background: rgba(255,255,255,0.3);
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 150px;
    display: none;
    z-index: 1000;
}

.language-dropdown.show {
    display: block;
}

.language-option {
    padding: 10px 15px;
    cursor: pointer;
    color: #333;
    border-bottom: 1px solid #eee;
}

.language-option:hover {
    background: #f8f9fa;
}

.language-option:last-child {
    border-bottom: none;
}

.header-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.header-subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
}

/* Hero Section */
.hero {
    padding: 80px 0;
    text-align: center;
    background: white;
}

.hero-image {
    width: 150px;
    height: 150px;
    border-radius: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.hero-description {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Features */
.features {
    padding: 80px 0;
    background: #f8f9fa;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.feature-card {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    text-align: center;
}

.feature-title {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 15px;
}

.feature-description {
    color: #666;
    line-height: 1.7;
}

/* CTA Section */
.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.cta-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta-description {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    background: #ff6b6b;
    color: white;
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.cta-motivation {
    margin-top: 20px;
    opacity: 0.8;
}

/* Testimonials */
.testimonials {
    padding: 80px 0;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: #2c3e50;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
}

.testimonial {
    background: #f8f9fa;
    padding: 40px;
    border-radius: 15px;
    border-left: 5px solid #667eea;
}

.testimonial-quote {
    font-size: 1.1rem;
    font-style: italic;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.7;
}

.testimonial-author {
    color: #667eea;
    font-weight: 600;
}

/* App Rating Section */
.app-rating {
    padding: 60px 0;
    background: #f8f9fa;
    text-align: center;
}

.rating-content {
    max-width: 600px;
    margin: 0 auto;
}

.rating-title {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #2c3e50;
}

.rating-stars {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.stars {
    font-size: 2rem;
    color: #f39c12;
}

.rating-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
}

.rating-description {
    color: #666;
    font-size: 1rem;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 40px 0;
    text-align: center;
}

.footer-links {
    margin-top: 20px;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    margin: 0 20px;
}

.footer-links a:hover {
    color: white;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
    z-index: 1000;
    display: none;
}

.cookie-banner.show {
    display: block;
}

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

.cookie-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
}

.cookie-btn-accept {
    background: #27ae60;
    color: white;
}

.cookie-btn-reject {
    background: #e74c3c;
    color: white;
}

.cookie-btn-customize {
    background: #f39c12;
    color: white;
}

/* Fun Fact Section */
.fun-fact {
    padding: 40px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.fun-fact-text {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.fun-emoji {
    font-size: 2rem;
    animation: bounce 2s infinite;
}

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

/* Social Proof Stats */
.social-proof {
    padding: 80px 0;
    background: #fff;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    max-width: 800px;
    margin: 0 auto;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    font-size: 1.1rem;
    color: #666;
}

/* Make buttons more fun */
.cta-button {
    background: linear-gradient(45deg, #ff6b6b, #ff8e53);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 35px rgba(255, 107, 107, 0.3);
}

.cta-button::after {
    content: '→';
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    opacity: 0;
    transition: all 0.3s ease;
}

.cta-button:hover::after {
    opacity: 1;
    right: 15px;
}

/* Add personality to testimonials */
.testimonial {
    position: relative;
    overflow: hidden;
}

.testimonial::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: 20px;
    font-size: 6rem;
    color: rgba(102, 126, 234, 0.1);
    font-family: Georgia, serif;
}

/* Cookie banner with personality */
.cookie-btn-accept {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(39, 174, 96, 0); }
    100% { box-shadow: 0 0 0 0 rgba(39, 174, 96, 0); }
}

/* Accessibility: Hide visually but keep for screen readers */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus styles for better keyboard navigation */
*:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Skip to content link (add to HTML if needed) */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #667eea;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .header-title {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .features-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .language-selector {
        position: static;
        margin-bottom: 20px;
    }
    
    .cookie-buttons {
        flex-direction: column;
    }
}

/* French-specific styling when lang="fr" */
html[lang="fr"] .header {
    background: linear-gradient(135deg, #0055A4 0%, #EF4135 50%, #0055A4 100%);
}

html[lang="fr"] .fun-fact {
    background: linear-gradient(135deg, #EF4135 0%, #0055A4 100%);
}

html[lang="fr"] .feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 85, 164, 0.2);
}

/* Add French flair to testimonials */
html[lang="fr"] .testimonial {
    border-left-color: #EF4135;
}

html[lang="fr"] .testimonial::before {
    content: '«';
    font-size: 4rem;
}

html[lang="fr"] .testimonial::after {
    content: '»';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 4rem;
    color: rgba(239, 65, 53, 0.1);
    font-family: Georgia, serif;
}

/* French typography adjustments */
html[lang="fr"] {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Marianne', Roboto, sans-serif;
}

html[lang="fr"] .hero-title,
html[lang="fr"] .section-title {
    letter-spacing: -0.5px;
}

/* Add a subtle French flag animation to the language button when French is selected */
html[lang="fr"] .language-btn {
    position: relative;
    overflow: hidden;
}

html[lang="fr"] .language-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        #0055A4 33%, 
        white 33%, 
        white 66%, 
        #EF4135 66%
    );
    opacity: 0.1;
    animation: frenchFlag 10s linear infinite;
}

@keyframes frenchFlag {
    to {
        left: 100%;
    }
}

/* Arabic-specific styling when lang="ar" */
html[lang="ar"] {
    direction: rtl;
    font-family: -apple-system, 'SF Arabic', 'Helvetica Neue Arabic', Arial, sans-serif;
}

/* Flip layout for RTL */
html[lang="ar"] .language-selector {
    left: 20px;
    right: auto;
}

html[lang="ar"] .language-dropdown {
    left: 0;
    right: auto;
}

html[lang="ar"] .header {
    background: linear-gradient(135deg, #006C35 0%, #193609 50%, #7b9604 100%);
}

html[lang="ar"] .fun-fact {
    background: linear-gradient(135deg, #006C35 0%, #FFD700 100%);
}

/* Arabic typography enhancements */
html[lang="ar"] body {
    font-size: 1.1rem;
    line-height: 1.8;
}

html[lang="ar"] .hero-title,
html[lang="ar"] .section-title {
    font-weight: 700;
    letter-spacing: 0;
}

/* Adjust padding and margins for RTL */
html[lang="ar"] .feature-card {
    text-align: right;
}

html[lang="ar"] .testimonial {
    border-right: 5px solid #006C35;
    border-left: none;
    padding-right: 40px;
    padding-left: 20px;
}

html[lang="ar"] .testimonial::before {
    content: '"';
    right: 20px;
    left: auto;
}

/* Arabic-style decorative elements */
html[lang="ar"] .feature-card::after {
    content: '✦';
    position: absolute;
    top: 20px;
    left: 20px;
    color: #006C35;
    font-size: 1.5rem;
    opacity: 0.3;
}

/* Adjust buttons for RTL */
html[lang="ar"] .cta-button {
    background: linear-gradient(45deg, #006C35, #008f4c);
}

html[lang="ar"] .cta-button::after {
    content: '→';
    transform: scaleX(-1) translateY(-50%);
    left: 20px;
    right: auto;
}

html[lang="ar"] .cta-button:hover::after {
    left: 15px;
}

/* Cookie banner adjustments */
html[lang="ar"] .cookie-buttons {
    flex-direction: row-reverse;
}

/* Footer links RTL */
html[lang="ar"] .footer-links {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-direction: row-reverse;
}

/* Animations with cultural colors */
html[lang="ar"] .fun-emoji {
    animation: bounce 2s infinite;
}

html[lang="ar"] .rating-stars .stars {
    color: #FFD700;
}

/* Add Islamic geometric pattern as subtle background */
html[lang="ar"] .hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(0, 108, 53, 0.03) 10px,
            rgba(0, 108, 53, 0.03) 20px
        );
    pointer-events: none;
}

/* Respectful hover effects */
html[lang="ar"] .feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 108, 53, 0.15);
}


/* --- Visual Refresh (Aug 2025) --- */
:root {
  --radius-xl: 24px;
  --shadow-sm: 0 6px 20px rgba(0,0,0,0.08);
  --shadow-md: 0 12px 35px rgba(0,0,0,0.12);
  --glass-bg: rgba(255,255,255,0.7);
  --backdrop: blur(12px);
}

/* Global typography & spacing */
body {
  letter-spacing: 0.1px;
}

/* New top nav */
.topbar {
  position: sticky;
  top: 0;
  z-index: 999;
  backdrop-filter: var(--backdrop);
  background: var(--glass-bg);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
}

/* Elevated hero */
.header {
  padding-top: 100px;
  padding-bottom: 60px;
  background: radial-gradient(1200px 600px at 50% -20%, rgba(255,255,255,0.35), transparent),
              linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.hero {
  position: relative;
  overflow: hidden;
}

.hero .container {
  position: relative;
}

.hero-card {
  margin: 30px auto 0;
  max-width: 980px;
  background: var(--glass-bg);
  backdrop-filter: var(--backdrop);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 28px;
}

/* Feature cards: glass & hover */
.feature-card {
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}

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

/* Screenshot gallery (if present) */
.screenshot-gallery {
  background: #fff;
  padding: 60px 0;
}
.screenshot-strip {
  display: grid;
  grid-auto-flow: column;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 10px;
}
.screenshot-strip img {
  height: 520px;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}

/* App Store button bump */
.cta-button {
  border: 1px solid rgba(255,255,255,0.25);
}

/* Social proof numbers animation friendly */
.stat-number {
  will-change: contents;
}

/* Footer polish */
.footer {
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --text-color: #e7e7ea;
    --light-bg: #0e1014;
  }
  body {
    background: #0e1014;
    color: var(--text-color);
  }
  .hero,
  .features,
  .testimonials,
  .app-rating,
  .social-proof {
    background: #0e1014;
  }
  .feature-card, .testimonial {
    background: #141821;
    color: var(--text-color);
  }
  .hero-card {
    background: rgba(20, 24, 33, 0.6);
  }
  .footer {
    background: #0b0d12;
  }
  .cta-button {
    border-color: rgba(255,255,255,0.1);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
