/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: #ffffff;
    color: #333333;
    line-height: 1.6;
}

/* Header styles */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header {
    padding: 20px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative; /* Ensures shadow appears above content */
    z-index: 10; /* Keeps shadow visible above other elements */
}

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

.logo {
    flex: 0 0 auto;
}

.logo-img {
    height: 32px;
    width: auto;
}

.dark-theme .logo-img {
    filter: brightness(0) invert(1);
}

.nav {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.nav a {
    text-decoration: none;
    color: #4b5563;
    font-weight: 500;
    transition: color 0.2s;
}

.nav a:hover {
    color: #2563eb;
}

.header-actions {
    flex: 0 0 auto;
    display: flex;
    gap: 12px;
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
}

.theme-toggle img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.theme-toggle .sun-icon {
    display: block;
}

.theme-toggle .moon-icon {
    display: none;
}

.dark-theme .theme-toggle .sun-icon {
    display: none;
}

.dark-theme .theme-toggle .moon-icon {
    display: block;
}

@media (max-width: 640px) {
    .nav {
        gap: 15px;
    }
}

@media (max-width: 600px) {
    .header-content {
        flex-wrap: wrap;
    }
    
    .logo {
        order: 1;
        flex: 1;
    }
    
    .right-top-corner {
        order: 2;
        padding: 8px 0;
    }
    .nav {
        order: 3;
        flex: 1;
        margin: 15px 25px 0 25px;
    }
    
    .theme-toggle {
        order: 3;
        margin-top: 15px;
        margin-left: 20px;
    }
    
    .header-actions {
        display: contents;
    }
    
    .logo-img {
        height: 28px;
        width: auto;
        margin-right: 50px;
    }
}

@media (max-width: 400px) {
    .logo-img {
        margin-right: 2px;
    }

    .testimonial-card {
        padding: 5px;
        margin: 0 5px;
    }
}

@media (max-width: 340px) {
    .logo-img {
        height: 18px;
        margin-top: 6px;
    }

    .nav {
        margin: 15px 5px 0 5px;
        gap: 8px;
    }
    
    .theme-toggle {
        margin-left: 5px;
    }
}

@media (max-width: 340px) {
  body {
    font-size: 14px;
    line-height: 1.5;
  }
  
  h1, h2, h3 {
    font-size: 90%;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .nav a {
    font-size: 14px;
  }
}

/* Section Alternating Backgrounds */
.testimonials-section {
    background: white;
}

.pricing-section {
    background: #f8fafc;
}

.faq-section {
    background: white;
}

/* Dark Theme */
.dark-theme .testimonials-section {
    background: #020617;
}

.dark-theme .pricing-section {
    background: #0f172a;
}

.dark-theme .faq-section {
    background: #020617;
}

/* Testimonials section */
.testimonials-section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 40px;
    color: #1e293b;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.testimonial-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin: 0 15px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.testimonial-card:hover {
    transform: translateY(-5px);
}

.testimonial-content {
    font-size: 16px;
    line-height: 1.7;
    color: #334155;
    margin-bottom: 20px;
    font-style: italic;
}

.testimonial-author {
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
}

.author-name {
    font-weight: 600;
    color: #1e293b;
}

.author-title {
    font-size: 14px;
    color: #64748b;
}

@media (max-width: 640px) {
    .testimonial-card {
        padding: 20px;
        margin: 0 10px;
    }
    .testimonials-grid {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }
    .section-title {
        font-size: 24px;
    }
}

@media (max-width: 400px) {
    .testimonial-card {
        padding: 15px;
        margin: 0 8px;
    }
    .testimonial-content {
        padding: 10px;
    }
    
    .testimonial-author {
        margin-top: 8px;
    }
}

@media (max-width: 340px) {
    .testimonial-card {
        padding: 12px;
        margin: 0 5px;
    }
}

/* FAQ section */
.faq-section {
    padding: 80px 0;
}

.faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.faq-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    height: fit-content;
    padding: 5px 0;
}

.faq-subtitle {
    text-align: center; /* Center text horizontally */
    color: #64748b;
    margin-top: 8px;
    padding: 16px;
}

.faq-subtitle a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.faq-subtitle a:hover {
    text-decoration: underline;
}

.dark-theme .faq-subtitle a {
    color: #93c5fd;
}

.faq-right {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.faq-item {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid #e2e8f0;
}

.faq-question {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 12px;
}

.faq-answer {
    color: #475569;
    line-height: 1.7;
}

.dark-theme .faq-item {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

@media (max-width: 640px) {
    .faq-grid {
        grid-template-columns: 1fr;
    }
    
    .faq-left {
        position: static;
        margin-bottom: 30px;
    }
    
    .faq-question {
        font-size: 18px;
        font-weight: 600;
        margin-bottom: 8px;
    }
    
    .faq-answer {
        color: #64748b;
        line-height: 1.6;
    }

    .section-title {
        font-size: 24px;
    }
}

/* Dark theme FAQ */
.dark-theme .faq-question {
    color: #f8fafc;
}

.dark-theme .faq-answer {
    color: #94a3b8;
}

/* Dark theme styles */
.dark-theme {
    background-color: #0f172a;
    color: #e2e8f0;
}

.dark-theme .header {
    border-bottom-color: #1e293b;
}

.dark-theme .nav a {
    color: #94a3b8;
}

.dark-theme .nav a:hover {
    color: #60a5fa;
}

.dark-theme .testimonials-section,
.dark-theme .faq-section {
    background-color: #1e293b;
}

.dark-theme .testimonial-card,
.dark-theme .faq-item {
    background-color: #1e293b;
    border-color: #334155;
}

.dark-theme .testimonial-card {
    background: #1e293b;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.dark-theme .testimonial-content {
    color: #e2e8f0;
}

.close-button-per-file,
.close-button {
    width: 32px;
    height: 32px;
    border-radius: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.close-button-per-file::before,
.close-button::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-image: url('/logo/close.png');
    background-size: contain;
    background-repeat: no-repeat;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.dark-theme .close-button-per-file::before,
.dark-theme .close-button::before {
    filter: brightness(0) invert(1);
}

.close-button-per-file:hover::before,
.close-button:hover::before {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0.8;
}

.close-button-per-file:disabled,
.close-button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Disable pull-to-refresh */
html, body {
    overscroll-behavior-y: contain;
}

/* User Dropdown Styles */
.user-dropdown {
    position: relative;
    display: inline-block;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    padding: 0;
    background: none;
    cursor: pointer;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dropdown-menu {
    position: absolute;
    right: 0;
    top: 50px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-width: 220px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.user-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    font-size: 16px;
    width: 100% !important;
    display: block;
    padding: 0.75rem 1rem;
    color: #334155;
    text-decoration: none;
    transition: background 0.2s;
    height: 48px;
}

.dropdown-item:hover {
    background: #f1f5f9;
}

button.dropdown-item {
    font-size: 16px;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    height: 48px;
}

button.dropdown-item:hover {
    background: #f1f5f9;
}

.dark-theme button.dropdown-item:hover {
    background: #334155;
}

.dropdown-divider {
    height: 1px;
    margin: 0;
    background-color: #e5e7eb;
    border: none;
}

.dark-theme .dropdown-divider {
    background-color: #334155;
}

/* Dark mode support */
.dark-theme .dropdown-menu {
    background: #1e293b;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.dark-theme .dropdown-item {
    color: #f8fafc;
}

.dark-theme .dropdown-item:hover {
    background: #334155;
}

/* Scrollbar styling for dark theme */
.dark-theme ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.dark-theme ::-webkit-scrollbar-track {
    background: var(--bg-color-dark);
}

.dark-theme ::-webkit-scrollbar-thumb {
    background: var(--text-color-secondary-dark);
    border-radius: 5px;
}

.dark-theme ::-webkit-scrollbar-thumb:hover {
    background: var(--text-color-primary-dark);
}

/* Paddle Checkout Container */
#paddle-checkout {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  background: white;
}
