/* ========================================
   IG Unfollower Pro - Public Website CSS
   Modern Corporate Design
   ======================================== */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* ========================================
   NAVIGATION
   ======================================== */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.75rem 0;
}

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

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    flex-shrink: 0; /* Prevent brand from shrinking */
}

.nav-brand i {
    font-size: 1.5rem;
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-left: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-menu a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    font-size: 0.95rem;
}

.nav-menu a:hover {
    color: var(--primary);
}

.btn-nav {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s;
    font-size: 0.9rem;
    white-space: nowrap;
}

.btn-nav.btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-nav:not(.btn-outline) {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.btn-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    position: relative;
}

.mobile-menu-toggle:focus {
    outline: none;
}

.mobile-menu-toggle:active {
    opacity: 0.7;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.mobile-menu-overlay.active {
    display: block;
}

/* Mobile Menu Styles */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        position: relative;
        z-index: 1002;
        width: 44px;
        height: 44px;
        border-radius: 8px;
        background: transparent;
        border: none;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    .mobile-menu-toggle i {
        font-size: 1.5rem;
        color: var(--primary);
        pointer-events: none;
    }

    .nav-menu {
        display: flex !important;
        visibility: hidden;
        opacity: 0;
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        max-width: 85vw;
        height: 100%;
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height for mobile */
        background: white;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
        flex-direction: column;
        align-items: stretch;
        padding: 5rem 2rem 2rem;
        gap: 1rem;
        z-index: 1001;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        -webkit-tap-highlight-color: transparent;
        /* Use transform instead of right for better performance */
        transform: translateX(100%);
        -webkit-transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0.3s, opacity 0.3s;
        -webkit-transition: -webkit-transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0.3s, opacity 0.3s;
        will-change: transform;
    }

    .nav-menu.active {
        visibility: visible;
        opacity: 1;
        transform: translateX(0);
        -webkit-transform: translateX(0);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0s, opacity 0.3s;
        -webkit-transition: -webkit-transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0s, opacity 0.3s;
    }

    .nav-links {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0;
    }

    .nav-links a {
        width: 100%;
        padding: 1rem 0;
        border-bottom: 1px solid var(--border-color);
        font-size: 1rem;
        -webkit-tap-highlight-color: rgba(99, 102, 241, 0.1);
        touch-action: manipulation;
        display: block;
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    .nav-buttons {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
        padding-top: 1rem;
        border-top: 1px solid var(--border-color);
        margin-top: 1rem;
    }

    .btn-nav {
        width: 100%;
        text-align: center;
        padding: 0.75rem 1rem;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
}

/* Safari/iOS specific fixes */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 768px) {
        .nav-menu {
            height: -webkit-fill-available;
        }
        
        /* Prevent iOS rubber-banding when menu is open */
        body.menu-open {
            position: fixed;
            width: 100%;
            height: 100%;
            overflow: hidden;
        }
    }
}

/* Fix for iOS Safari address bar */
@supports (height: 100dvh) {
    @media (max-width: 768px) {
        .nav-menu {
            height: 100dvh;
        }
    }
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero .container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

@media (max-width: 768px) {
    .hero .container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-card {
        padding: 2rem;
    }
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.gradient-text {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 2rem;
    padding: 4rem;
    color: white;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.btn-outline {
    background: transparent;
    border: 2px solid currentColor;
    color: inherit;
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.badge-success { background: var(--success); color: white; }
.badge-warning { background: var(--warning); color: white; }
.badge-danger { background: var(--danger); color: white; }
.badge-info { background: #3b82f6; color: white; }
.badge-secondary { background: #64748b; color: white; }

/* Pricing card specific button styles */
.pricing-card .btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: white;
}

.pricing-card .btn-outline:hover {
    background: var(--primary);
    color: white;
}

.pricing-card .btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* ========================================
   SMOOTH SCROLL & SECTION TRANSITIONS
   ======================================== */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

section {
    scroll-margin-top: 80px; /* Account for fixed navbar */
    transition: opacity 0.3s ease, transform 0.3s ease;
}

section:not(.visible) {
    opacity: 0;
    transform: translateY(20px);
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Footer scroll target */
.footer {
    scroll-margin-top: 80px;
}

/* ========================================
   FEATURES
   ======================================== */
.features {
    padding: 6rem 0;
    background: var(--bg-light);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.section-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.feature-card {
    background: white;
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* ========================================
   PRICING
   ======================================== */
.pricing {
    padding: 6rem 0;
    background: white;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.pricing-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 3rem 2.5rem;
    text-align: center;
    position: relative;
    transition: all 0.3s;
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.pricing-card.popular {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
}

.popular-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.875rem;
}

.pricing-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.price {
    margin: 1.5rem 0;
}

.price .amount {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
}

.price .currency {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-left: 0.25rem;
}

.price-description {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.features-list {
    list-style: none;
    text-align: left;
    margin-bottom: 2rem;
}

.features-list li {
    padding: 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.features-list i {
    color: var(--success);
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: white;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* ========================================
   FORM ELEMENTS
   ======================================== */
.form-control,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s;
    background: white;
    color: var(--text-dark);
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-control::placeholder {
    color: var(--text-light);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero .container {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .features-grid,
    .pricing-grid {
        grid-template-columns: 1fr;
    }
}

