/*
Theme Name: RankMyApps - Astra Child
Theme URI: https://rankmyapps.com
Description: Professional SaaS theme for RankMyApps - A platform helping indie app developers discover winning mobile apps
Author: RankMyApps Team
Author URI: https://rankmyapps.com
Template: astra
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rankmyapps
*/

/* ==========================================================================
   Root Variables
   ========================================================================== */
:root {
    --rma-primary: #6366f1;
    --rma-primary-dark: #4f46e5;
    --rma-secondary: #10b981;
    --rma-dark: #0f172a;
    --rma-gray: #64748b;
    --rma-light-gray: #f1f5f9;
    --rma-white: #ffffff;
    --rma-border: #e2e8f0;
    --rma-radius: 12px;
    --rma-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --rma-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ==========================================================================
   Global Styles
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--rma-dark);
    line-height: 1.6;
}

.rma-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.rma-section {
    padding: 80px 0;
}

/* ==========================================================================
   Typography
   ========================================================================== */
.rma-heading-xl {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

.rma-heading-lg,
h2 {
    font-family: 'Inter', sans-serif !important;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.rma-heading-md {
    font-size: 1.875rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.rma-text-lg {
    font-size: 1.25rem;
    line-height: 1.7;
    color: var(--rma-gray);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.rma-btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--rma-radius);
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    text-align: center;
}

.rma-btn-primary {
    background: var(--rma-primary);
    color: var(--rma-white);
}

.rma-btn-primary:hover {
    background: var(--rma-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--rma-shadow-lg);
}

.rma-btn-secondary {
    background: var(--rma-white);
    color: var(--rma-primary);
    border: 2px solid var(--rma-primary);
}

.rma-btn-secondary:hover {
    background: var(--rma-light-gray);
}

.rma-btn-large {
    padding: 18px 40px;
    font-size: 1.125rem;
}

/* ==========================================================================
   Cards
   ========================================================================== */
.rma-card {
    background: var(--rma-white);
    border-radius: var(--rma-radius);
    padding: 30px;
    box-shadow: var(--rma-shadow);
    border: 1px solid var(--rma-border);
    transition: all 0.3s ease;
}

.rma-card:hover {
    box-shadow: var(--rma-shadow-lg);
    transform: translateY(-4px);
}

.rma-card-header {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--rma-border);
}

.rma-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.rma-card-body {
    margin-bottom: 20px;
}

/* ==========================================================================
   Badges & Labels
   ========================================================================== */
.rma-badge {
    display: inline-block;
    padding: 6px 12px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rma-badge-primary {
    background: rgba(99, 102, 241, 0.1);
    color: var(--rma-primary);
}

.rma-badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--rma-secondary);
}

/* ==========================================================================
   Access Control Elements
   ========================================================================== */
.rma-locked-content {
    position: relative;
    overflow: hidden;
}

.rma-locked-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to bottom, transparent, var(--rma-white));
}

.rma-upgrade-box {
    background: linear-gradient(135deg, var(--rma-primary) 0%, var(--rma-primary-dark) 100%);
    color: var(--rma-white);
    padding: 40px;
    border-radius: var(--rma-radius);
    text-align: center;
    margin: 40px 0;
}

.rma-upgrade-box h3 {
    color: var(--rma-white);
    margin-bottom: 1rem;
}

.rma-upgrade-box p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   Grid System
   ========================================================================== */
.rma-grid {
    display: grid;
    gap: 30px;
}

.rma-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.rma-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.rma-header-cta {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.rma-hero {
    padding: 100px 0;
    text-align: center;
    background: linear-gradient(180deg, var(--rma-light-gray) 0%, var(--rma-white) 100%);
}

.rma-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

/* ==========================================================================
   Pricing
   ========================================================================== */
.rma-pricing-card {
    background: var(--rma-white);
    border: 2px solid var(--rma-primary);
    border-radius: var(--rma-radius);
    padding: 50px 40px;
    text-align: center;
    max-width: 450px;
    margin: 0 auto;
}

.rma-price {
    font-size: 4rem;
    font-weight: 800;
    color: var(--rma-primary);
    line-height: 1;
}

.rma-price-period {
    font-size: 1.25rem;
    color: var(--rma-gray);
}

.rma-features-list {
    list-style: none;
    padding: 0;
    margin: 30px 0;
    text-align: left;
}

.rma-features-list li {
    padding: 12px 0;
    padding-left: 30px;
    position: relative;
}

.rma-features-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--rma-secondary);
    font-weight: bold;
    font-size: 1.2rem;
}

/* ==========================================================================
   Report Styles
   ========================================================================== */
.rma-report-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.rma-app-card {
    background: var(--rma-white);
    border: 1px solid var(--rma-border);
    border-radius: var(--rma-radius);
    padding: 25px;
    margin-bottom: 20px;
}

.rma-app-header {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.rma-app-icon {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    object-fit: cover;
}

.rma-app-info h3 {
    margin-bottom: 8px;
    font-size: 1.5rem;
}

.rma-app-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    padding: 20px;
    background: var(--rma-light-gray);
    border-radius: 8px;
    margin-top: 20px;
}

.rma-stat-item {
    text-align: center;
}

.rma-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--rma-primary);
    display: block;
}

.rma-stat-label {
    font-size: 0.875rem;
    color: var(--rma-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   ASO Tools
   ========================================================================== */
.rma-tool-box {
    background: var(--rma-white);
    border: 1px solid var(--rma-border);
    border-radius: var(--rma-radius);
    padding: 30px;
    margin-bottom: 30px;
}

.rma-form-group {
    margin-bottom: 20px;
}

.rma-form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--rma-dark);
}

.rma-form-input,
.rma-form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--rma-border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.rma-form-input:focus,
.rma-form-textarea:focus {
    outline: none;
    border-color: var(--rma-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.rma-form-textarea {
    min-height: 120px;
    resize: vertical;
}

.rma-output-box {
    background: var(--rma-light-gray);
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    min-height: 100px;
}

/* ==========================================================================
   SaaS Header Component
   ========================================================================== */
.rma-site-header {
    position: sticky;
    top: 20px;
    z-index: 1000;
    width: 100%;
    padding: 0 20px;
    /* Horizontal padding for the page */
    margin-bottom: 40px;
    /* Space below header */
    transition: all 0.3s ease;
}

.rma-header-pill {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    /* Capsule shape */
    padding: 12px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

/* Scrolled state (optional: make it tighter or more shadow) */
.rma-site-header.scrolled .rma-header-pill {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    border-color: #cbd5e1;
    padding: 10px 24px;
}

/* Logo */
.rma-logo-img {
    height: 36px;
    width: auto;
    display: block;
}

/* Desktop Nav */
.rma-nav-desktop {
    display: flex;
    gap: 32px;
}

.rma-nav-link {
    color: #475569;
    font-weight: 500;
    text-decoration: none;
    font-size: 0.95rem;
    position: relative;
    transition: color 0.2s;
}

.rma-nav-link:hover {
    color: var(--rma-primary);
}

/* Buttons */
.rma-header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.rma-btn-login {
    color: #475569;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.rma-btn-login:hover {
    color: #1e293b;
}

.rma-btn-primary {
    background: var(--rma-primary);
    color: white;
    padding: 10px 24px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.rma-btn-primary:hover {
    background: var(--rma-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(99, 102, 241, 0.25);
    color: white;
}

.rma-btn-primary .arrow {
    transition: transform 0.2s;
}

.rma-btn-primary:hover .arrow {
    transform: translateX(3px);
}

/* Mobile Toggle */
.rma-mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: #475569;
    cursor: pointer;
    padding: 4px;
}

/* Mobile Menu */
.rma-mobile-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 20px;
    right: 20px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.rma-mobile-menu.active {
    display: block;
    animation: fadeInDown 0.2s ease-out;
}

.rma-mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.rma-nav-link-mobile {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.rma-mobile-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: center;
}

.rma-btn-login.mobile {
    display: block;
    padding: 10px;
    background: #f8fafc;
    border-radius: 8px;
}

.rma-btn-primary.full-width {
    justify-content: center;
    width: 100%;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 992px) {

    .rma-nav-desktop,
    .rma-btn-login {
        display: none;
    }

    .rma-mobile-toggle {
        display: block;
    }

    .rma-header-pill {
        padding: 10px 20px;
    }
}

@media (max-width: 768px) {
    .rma-heading-xl {
        font-size: 2.5rem;
    }

    .rma-heading-lg {
        font-size: 2rem;
    }

    .rma-section {
        padding: 50px 0;
    }

    .rma-hero {
        padding: 60px 0;
    }

    .rma-app-header {
        flex-direction: column;
    }

    .rma-price {
        font-size: 3rem;
    }
}

/* Hide Header on Account Portal */
.page-template-template-account .rma-site-header,
.page-template-template-account #rma-saas-header,
.page-template-template-account .site-header,
.page-template-template-account .ast-builder-header,
.page-template-template-account header {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
}
/* ==========================================================================
   Mobile Menu Fixes
   ========================================================================== */
/* Fix Z-Index to ensure menu is clickable */
.ast-mobile-header-wrap .ast-mobile-header-content,
.ast-mobile-popup-drawer.active .ast-mobile-popup-inner {
    z-index: 999999 !important;
}

/* Add padding to mobile dropdown menu */
.ast-header-break-point .main-header-menu {
    padding-top: 20px !important;
    padding-bottom: 20px !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
}

.ast-header-break-point .main-header-menu .menu-item {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

/* Ensure mobile toggle is clickable */
.ast-mobile-menu-trigger-fill, 
.ast-mobile-menu-buttons-fill,
.ast-button-wrap,
.ast-mobile-menu-trigger-minimal {
    z-index: 999999 !important;
    position: relative;
    margin-right: 20px !important;
    padding: 8px !important;
}

.ast-mobile-menu-trigger-fill {
    margin-left: auto !important;

/* Additional mobile header spacing */
@media (max-width: 992px) {
    .ast-mobile-header-wrap {
        padding-right: 20px !important;
    }
    
    .ast-header-break-point .site-header {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}
}

/* Force mobile menu and links to be interactive - CRITICAL FIX */
.ast-header-break-point .main-header-menu,
.ast-header-break-point .main-header-menu .menu-item,
.ast-header-break-point .main-header-menu .menu-item a,
.ast-header-break-point .main-header-menu .menu-link {
    pointer-events: auto !important;
    position: relative !important;
    z-index: 999999 !important;
    cursor: pointer !important;
}

/* Ensure mobile menu drawer is above everything */
.ast-mobile-popup-drawer,
.ast-mobile-popup-inner {
    z-index: 999999 !important;
    pointer-events: auto !important;
}

/* Prevent background elements from blocking mobile menu */
@media (max-width: 992px) {
    body.page-template-template-landing {
        background-attachment: scroll !important;
    }
    
    .rma-landing {
        position: relative;
        z-index: 1 !important;
    }
    
    .site-header,
    .ast-builder-header,
    header {
        position: relative !important;
        z-index: 999999 !important;
        pointer-events: auto !important;
    }
    
    /* Override any pointer-events: none on mobile */
    * {
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
    }
}
