/* ============================================
   RESPONSIVE DESIGN — Phase 3
   LockMargin | https://lockmargin.com
   ============================================ */

/* ============================================
   ROOT VARIABLES
   ============================================ */
:root {
    --font-base: 1rem;
    --font-sm: 0.875rem;
    --font-lg: 1.125rem;
    --font-xl: 1.25rem;
    --font-2xl: 1.5rem;
    --font-3xl: 2rem;
    --font-4xl: 2.5rem;

    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;

    --container-max: 1200px;
    --container-padding: 1.5rem;

    --border-radius: 8px;
    --transition: 0.3s ease;
}

/* ============================================
   CONTAINER OVERRIDES
   ============================================ */
.lm-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    width: 100%;
    box-sizing: border-box;
}

/* ============================================
   TYPOGRAPHY OVERRIDES (where !important allows)
   ============================================ */
@media (max-width: 480px) {
    :root {
        --font-2xl: 1.25rem;
        --font-3xl: 1.5rem;
        --font-4xl: 1.75rem;
        --container-padding: 1rem;
        --spacing-xl: 1.5rem;
        --spacing-2xl: 2rem;
        --spacing-3xl: 2.5rem;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    :root {
        --font-2xl: 1.35rem;
        --font-3xl: 1.75rem;
        --font-4xl: 2rem;
        --container-padding: 1.25rem;
    }
}

/* ============================================
   MOBILE: 0-480px
   ============================================ */
@media (max-width: 480px) {
    /* Typography */
    h1, .lm-hero-title, [class*="heading"] h1 {
        font-size: 1.75rem !important;
    }
    h2, .lm-section-title, [class*="title"] h2 {
        font-size: 1.5rem !important;
    }
    h3 {
        font-size: 1.25rem !important;
    }
    p, .lm-hero-sub, .lm-text, .lm-section-text {
        font-size: 0.95rem !important;
    }

    /* Hero section */
    .lm-hero-section {
        padding-top: 60px !important;
        padding-bottom: 40px !important;
    }

    /* Reduce spacing */
    section, .lm-section, .lm-section-pad {
        padding-top: var(--spacing-xl) !important;
        padding-bottom: var(--spacing-xl) !important;
    }

    /* Margin reductions */
    .lm-mb-xl, [class*="lm-mb-"] {
        margin-bottom: var(--spacing-lg) !important;
    }

    /* Comparison pages */
    .lm-compare-grid, .lm-comparison-grid {
        grid-template-columns: 1fr !important;
        gap: var(--spacing-lg) !important;
    }
}

/* ============================================
   TABLETS: 481-768px
   ============================================ */
@media (min-width: 481px) and (max-width: 768px) {
    h1, .lm-hero-title {
        font-size: 2rem !important;
    }
    h2, .lm-section-title {
        font-size: 1.75rem !important;
    }

    /* 2-column grids on tablet */
    .lm-feature-grid, .lm-pricing-grid, .lm-grid-3 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ============================================
   RESPONSIVE NAVIGATION
   ============================================ */

/* Desktop nav default */
.lm-nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    position: relative;
}

.lm-nav {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.lm-nav a.lm-nav-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    white-space: nowrap;
}

.lm-nav a.lm-nav-link:hover {
    color: #fff !important;
}

/* Hamburger toggle */
.lm-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: #fff;
}

.lm-nav-toggle svg {
    width: 28px;
    height: 28px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    display: block;
}

@media (max-width: 768px) {
    .lm-nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1001;
    }

    .lm-nav {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
        width: 100%;
        padding: 1rem 0;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        margin-top: 0.5rem;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #0a0a0f;
        z-index: 1000;
    }

    .lm-nav.active {
        display: flex !important;
    }

    .lm-nav a.lm-nav-link {
        display: block;
        padding: 0.6rem 0;
        font-size: 1rem;
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    }

    .lm-nav a.lm-btn {
        text-align: center;
        padding: 0.75rem;
        width: 100%;
        margin-top: 0.25rem;
    }

    /* Fix header layout */
    .lm-header {
        padding: 0.75rem 0 !important;
    }
}

/* ============================================
   IMAGES
   ============================================ */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* ============================================
   TABLES
   ============================================ */
.table-wrapper, [class*="table-wrapper"] {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: var(--spacing-lg) 0;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

table, .lm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-sm);
    min-width: 600px;
}

@media (max-width: 480px) {
    .table-wrapper {
        margin: var(--spacing-md) 0;
        border-radius: var(--border-radius);
    }
    table, .lm-table {
        font-size: 0.8rem;
        min-width: 500px;
    }
    table th, table td,
    .lm-table th, .lm-table td {
        padding: 0.4rem 0.6rem !important;
    }
}

/* ============================================
   FORMS
   ============================================ */
@media (max-width: 480px) {
    input, textarea, select,
    .lm-input, .lm-form input, .lm-form textarea {
        font-size: 1rem !important; /* Prevent iOS zoom */
    }
}

/* ============================================
   BUTTONS
   ============================================ */
.lm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 44px;
}

@media (max-width: 480px) {
    .lm-btn {
        width: 100%;
        text-align: center;
        min-height: 48px;
    }
}

/* ============================================
   FOOTER
   ============================================ */
footer, .lm-footer {
    padding: var(--spacing-2xl) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: var(--spacing-3xl);
}

footer .lm-container,
.lm-footer .lm-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
}

@media (max-width: 480px) {
    footer .lm-container,
    .lm-footer .lm-container {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-sm);
    }

    .footer-links, .lm-footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--spacing-sm) !important;
    }
}

/* ============================================
   TESTIMONIALS
   ============================================ */

.testimonials-section {
    padding: var(--spacing-2xl) 0;
    background: rgba(255, 255, 255, 0.02);
}

.testimonials-section h2 {
    text-align: center;
    margin-bottom: var(--spacing-sm);
}

.testimonials-section .subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    max-width: 600px;
    margin: 0 auto var(--spacing-xl);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.testimonials-cta {
    text-align: center;
    margin-top: var(--spacing-xl);
    padding: var(--spacing-xl);
    background: rgba(108, 99, 255, 0.05);
    border-radius: var(--border-radius);
    border: 1px solid rgba(108, 99, 255, 0.1);
}

.testimonials-cta p {
    font-size: var(--font-lg);
    margin-bottom: var(--spacing-md);
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    transition: all var(--transition);
}

.testimonial-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(108, 99, 255, 0.2);
    transform: translateY(-2px);
}

.testimonial-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.testimonial-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(108, 99, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial-avatar-placeholder {
    font-size: 1.25rem;
    font-weight: 700;
    color: #6c63ff;
}

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

.testimonial-meta h4 {
    font-size: var(--font-base);
    font-weight: 600;
    margin: 0;
    color: #fff;
}

.testimonial-role {
    font-size: var(--font-sm);
    color: rgba(255, 255, 255, 0.5);
    display: block;
}

.testimonial-location {
    font-size: var(--font-sm);
    color: rgba(255, 255, 255, 0.65);
    display: block;
}

.testimonial-rating {
    margin: var(--spacing-xs) 0 var(--spacing-sm);
    font-size: 1rem;
    letter-spacing: 2px;
}

.testimonial-text {
    font-size: var(--font-sm);
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-style: italic;
}

.testimonial-date {
    display: block;
    margin-top: var(--spacing-sm);
    font-size: var(--font-sm);
    color: rgba(255, 255, 255, 0.65);
}

@media (max-width: 480px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    .testimonial-card {
        padding: var(--spacing-md);
    }
    .testimonial-avatar {
        width: 40px;
        height: 40px;
    }
    .testimonial-header {
        gap: var(--spacing-sm);
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
}

/* ============================================
   SCREENSHOTS
   ============================================ */

.screenshots-section {
    padding: var(--spacing-2xl) 0;
}

.screenshots-section h2 {
    text-align: center;
}

.screenshots-section .subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    max-width: 600px;
    margin: 0 auto var(--spacing-xl);
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-xl);
}

.screenshot-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all var(--transition);
}

.screenshot-item:hover {
    border-color: rgba(108, 99, 255, 0.2);
    transform: translateY(-2px);
}

.screenshot {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16/10;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.03);
}

.screenshot-caption {
    padding: var(--spacing-md);
    margin: 0;
    font-size: var(--font-sm);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    font-weight: 500;
}

@media (max-width: 480px) {
    .screenshots-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    .screenshot-caption {
        padding: var(--spacing-sm);
        font-size: 0.85rem;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .screenshots-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
}

/* ============================================
   COOKIE CONSENT BANNER
   ============================================ */

#cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #0a0a0f;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: var(--spacing-md) 0;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

#cookie-consent-banner {
    animation: slideUp 0.3s ease;
}

.cookie-consent-content {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.cookie-text {
    flex: 1;
    min-width: 200px;
}

.cookie-text strong {
    display: block;
    font-size: var(--font-base);
    color: #fff;
    margin-bottom: 2px;
}

.cookie-text p {
    font-size: var(--font-sm);
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    line-height: 1.5;
}

.cookie-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.cookie-actions .btn-primary,
.cookie-actions .btn-secondary {
    padding: 0.5rem 1.25rem;
    font-size: var(--font-sm);
    min-height: 36px;
}

.cookie-link {
    font-size: var(--font-sm);
    color: rgba(255, 255, 255, 0.65);
    text-decoration: underline;
    transition: color var(--transition);
    padding: 0.5rem;
}

.lm-newsletter-privacy a {
    color: var(--accent-light);
    text-decoration: none;
}

.cookie-link:hover {
    color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-md);
        padding: var(--spacing-sm) var(--container-padding);
    }
    .cookie-actions {
        width: 100%;
        justify-content: flex-start;
    }
    .cookie-actions .btn-primary,
    .cookie-actions .btn-secondary {
        flex: 1;
        justify-content: center;
    }
}

/* ============================================
   FAQ
   ============================================ */

.faq-section {
    padding: var(--spacing-2xl) 0;
}

.faq-section h1 {
    text-align: center;
    margin-bottom: var(--spacing-sm);
}

.faq-section .subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    max-width: 600px;
    margin: 0 auto var(--spacing-xl);
}

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

.faq-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: var(--spacing-md) 0;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    font-size: var(--font-lg);
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) 0;
    user-select: none;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.faq-question:hover {
    color: #6c63ff;
}

.faq-question .faq-icon {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: var(--spacing-md);
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    display: none;
    padding: var(--spacing-sm) 0 var(--spacing-xs);
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    font-size: var(--font-base);
}

.faq-answer.open {
    display: block;
}

@media (max-width: 480px) {
    .faq-question {
        font-size: var(--font-base);
    }
}

/* ============================================
   TRUST SIGNALS
   ============================================ */

.trust-section {
    padding: var(--spacing-xl) 0;
    background: rgba(255, 255, 255, 0.02);
    text-align: center;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--spacing-lg);
    max-width: 800px;
    margin: var(--spacing-lg) auto 0;
}

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-md);
}

.trust-icon {
    font-size: 2rem;
    margin-bottom: var(--spacing-xs);
}

.trust-item h4 {
    font-size: var(--font-base);
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.trust-item p {
    font-size: var(--font-sm);
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Hide on mobile */
.hide-mobile {
    display: inline-block;
}
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

/* Show on mobile only */
.show-mobile {
    display: none !important;
}
@media (max-width: 768px) {
    .show-mobile {
        display: inline-block !important;
    }
}

