/* ============================================
   BestLiveIPTV - Comprehensive Responsive CSS
   Mobile-First Responsive Design System
   All Screens - Mobile, Tablet, Desktop
   ============================================ */

/* ============================================
   Base Mobile Reset & Improvements
   ============================================ */
html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Touch-friendly tap targets */
a,
button,
input,
select,
textarea {
    touch-action: manipulation;
}

/* Prevent horizontal scroll on mobile */
body,
html {
    overflow-x: hidden;
}

/* Better image handling */
img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   Mobile First - Base Styles (< 480px)
   ============================================ */
@media (max-width: 480px) {

    /* Container */
    .container {
        padding: 0 1rem;
    }

    /* Typography - Keep text readable but not too small */
    h1,
    .h1 {
        font-size: 2rem !important;
        line-height: 1.2;
    }

    h2,
    .h2 {
        font-size: 1.625rem !important;
    }

    h3,
    .h3 {
        font-size: 1.375rem !important;
    }

    h4,
    .h4 {
        font-size: 1.125rem !important;
    }

    /* Buttons */
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9375rem;
        width: 100%;
    }

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

    .btn i {
        font-size: 1.125rem;
    }

    /* ===== HERO SECTION - MOBILE OPTIMIZED ===== */
    .hero {
        padding-top: 90px;
        padding-bottom: 2.5rem;
        min-height: auto;
    }

    /* Hero Title - Large & Bold like professional sites */
    .hero-title {
        font-size: 2.5rem !important;
        line-height: 1.15 !important;
        font-weight: 800 !important;
        letter-spacing: -0.02em;
        margin-bottom: 1.25rem !important;
        text-align: left;
    }

    .hero-title .text-gradient {
        display: inline;
    }

    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.7;
        opacity: 0.9;
        margin-bottom: 1.5rem;
        text-align: left;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: left;
        gap: 2rem;
    }

    .hero-text {
        order: 1;
        padding: 0;
        text-align: left;
    }

    .hero-visual {
        order: 2;
        display: none;
    }

    .hero-cta {
        flex-direction: column;
        gap: 0.875rem;
        margin-bottom: 2rem;
        align-items: flex-start;
    }

    .hero-cta .btn {
        width: 100%;
        justify-content: center;
        padding: 1rem 1.5rem;
        font-size: 1rem;
        font-weight: 600;
    }

    .hero-features {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }

    .hero-feature {
        width: auto;
        padding: 0.5rem 0.875rem;
        font-size: 0.8125rem;
        justify-content: flex-start;
    }

    .trust-badges {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 0.5rem;
    }

    .trust-badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.625rem;
    }

    /* ===== PAGE HERO - MOBILE OPTIMIZED (LEFT ALIGNED) ===== */
    .page-hero {
        padding: 110px 0 50px;
        min-height: auto;
    }

    .page-hero-title {
        font-size: 2.25rem !important;
        line-height: 1.2 !important;
        font-weight: 800 !important;
        margin-bottom: 1rem !important;
        text-align: left;
    }

    .page-hero-subtitle {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 1.5rem;
        text-align: left;
        max-width: 100%;
    }

    .page-hero-content {
        grid-template-columns: 1fr !important;
        text-align: left;
    }

    .page-hero-text {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .page-hero-badge {
        margin-bottom: 1rem;
    }

    .page-hero-features {
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
        justify-content: flex-start;
        gap: 0.5rem;
    }

    .page-hero-feature {
        width: auto;
        justify-content: flex-start;
    }

    .page-hero-visual {
        display: none;
    }

    /* Hero CTA on page heroes */
    .page-hero .hero-cta,
    .page-hero-text .hero-cta {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 0.75rem;
    }

    .page-hero .hero-cta .btn,
    .page-hero-text .hero-cta .btn {
        width: 100%;
    }

    /* Section Headers */
    .section-header {
        margin-bottom: 2rem;
        text-align: center;
    }

    .section-title {
        font-size: 1.5rem !important;
    }

    .section-subtitle {
        font-size: 0.9375rem;
    }

    /* Stats Grid */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-card {
        padding: 1.25rem;
    }

    .stat-number {
        font-size: 1.75rem;
    }

    /* Features Grid */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .feature-icon {
        width: 50px;
        height: 50px;
    }

    .feature-title {
        font-size: 1.125rem;
    }

    .feature-tags {
        flex-wrap: wrap;
    }

    /* Devices Section */
    .devices-showcase {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .device-item {
        padding: 1rem;
    }

    .device-icon i {
        font-size: 1.5rem;
    }

    .device-name {
        font-size: 0.75rem;
    }

    /* Pricing Section */
    .pricing-tabs {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .tab-btn {
        flex: 1 1 calc(50% - 0.25rem);
        padding: 0.75rem 0.5rem;
        font-size: 0.8125rem;
    }

    .tab-badge {
        display: none;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .pricing-card {
        padding: 1.5rem;
    }

    .pricing-card.popular {
        transform: none;
    }

    .plan-name {
        font-size: 1.25rem;
    }

    .current-price .amount {
        font-size: 2.5rem;
    }

    .pricing-features li {
        font-size: 0.875rem;
        padding: 0.5rem 0;
    }

    /* Steps/How It Works */
    .steps-grid {
        flex-direction: column;
        gap: 1.5rem;
    }

    .step-card {
        padding: 1.5rem;
    }

    .step-connector {
        transform: rotate(90deg);
        margin: 0;
    }

    .step-number span {
        font-size: 1.5rem;
    }

    /* Testimonials */
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .testimonial-card {
        padding: 1.5rem;
    }

    .testimonial-content {
        font-size: 0.9375rem;
    }

    /* FAQ */
    .faq-grid {
        gap: 0.75rem;
    }

    .faq-question {
        padding: 1rem;
        font-size: 0.9375rem;
    }

    .faq-answer p {
        font-size: 0.875rem;
        padding: 0 1rem 1rem;
    }

    /* CTA Section */
    .cta-section,
    .cta-card {
        padding: 2rem 1.5rem;
    }

    .cta-title {
        font-size: 1.5rem;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .cta-buttons .btn {
        width: 100%;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-brand {
        margin-bottom: 1rem;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-links {
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    /* Contact Page */
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .contact-info-card {
        padding: 1.5rem;
    }

    /* Packages Page */
    .package-filters {
        flex-direction: column;
    }

    .packages-grid {
        grid-template-columns: 1fr;
    }

    /* Checkout Page */
    .checkout-grid {
        grid-template-columns: 1fr;
    }

    .checkout-form,
    .order-summary {
        padding: 1.5rem;
    }

    /* Auth Pages */
    .auth-card {
        padding: 1.5rem;
        margin: 1rem;
    }

    .auth-title {
        font-size: 1.5rem;
    }

    /* Profile Page */
    .profile-hero-card {
        padding: 1.5rem;
    }

    .avatar-large {
        width: 80px;
        height: 80px;
    }

    .profile-name {
        font-size: 1.5rem;
    }

    .profile-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .profile-tab-btn {
        flex-shrink: 0;
        padding: 0.75rem 1rem;
        font-size: 0.8125rem;
    }

    /* Blog Page */
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-card-featured {
        grid-column: span 1;
        grid-row: span 1;
    }

    .blog-card-featured .blog-card-image {
        min-height: 200px;
    }

    .blog-categories {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.5rem;
        justify-content: flex-start;
    }

    .category-btn {
        flex-shrink: 0;
        padding: 0.625rem 1rem;
        font-size: 0.8125rem;
    }

    /* Reseller Page */
    .reseller-stats-card {
        padding: 1.5rem;
    }

    .reseller-stats-grid .stat-value {
        font-size: 1.5rem;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .benefit-card {
        padding: 1.5rem;
    }

    .reseller-packages-grid {
        grid-template-columns: 1fr;
        max-width: 100%;
    }

    /* Channels Page */
    .channels-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .channel-card {
        padding: 0.75rem;
    }

    /* Tables - Make them scrollable */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Forms */
    .form-row,
    .form-row-pro {
        grid-template-columns: 1fr;
    }

    .form-control,
    .form-control-pro {
        font-size: 16px;
        /* Prevents zoom on iOS */
    }

    /* Newsletter */
    .newsletter-form {
        width: 100%;
    }

    .newsletter-input-wrapper {
        flex-direction: column;
    }

    .newsletter-input-wrapper .btn {
        width: 100%;
    }
}

/* ============================================
   Small Tablets (481px - 768px)
   ============================================ */
@media (min-width: 481px) and (max-width: 768px) {
    .container {
        padding: 0 1.25rem;
    }

    /* Typography */
    h1,
    .h1 {
        font-size: 2rem;
    }

    h2,
    .h2 {
        font-size: 1.75rem;
    }

    /* Hero - Keep large and bold, Left Aligned */
    .hero-title {
        font-size: 2.75rem !important;
        line-height: 1.15 !important;
        font-weight: 800 !important;
        text-align: left;
    }

    .hero-subtitle {
        font-size: 1.0625rem;
        max-width: 100%;
        text-align: left;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .hero-text {
        align-items: flex-start;
    }

    .hero-visual {
        display: none;
    }

    .hero-cta {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 0.875rem;
    }

    .hero-cta .btn {
        flex: 0 0 auto;
        width: auto;
        padding: 1rem 1.75rem;
    }

    .hero-features {
        justify-content: flex-start;
    }

    .trust-badges {
        justify-content: flex-start;
    }

    /* Page Hero - Left Aligned */
    .page-hero-title {
        font-size: 2.5rem !important;
        font-weight: 800 !important;
        text-align: left;
    }

    .page-hero-subtitle {
        text-align: left;
    }

    .page-hero {
        padding: 140px 0 60px;
    }

    .page-hero-content {
        grid-template-columns: 1fr !important;
        text-align: left;
    }

    .page-hero-text {
        align-items: flex-start;
    }

    .page-hero-visual {
        display: none;
    }

    /* Grids */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .devices-showcase {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Steps */
    .steps-grid {
        flex-direction: column;
    }

    .step-connector {
        transform: rotate(90deg);
    }

    /* Blog */
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .blog-card-featured {
        grid-column: span 2;
    }

    /* Benefits */
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Channels */
    .channels-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* CTA */
    .cta-card {
        flex-direction: column;
        text-align: center;
    }

    .cta-buttons {
        justify-content: center;
    }
}

/* ============================================
   Tablets (769px - 1024px)
   ============================================ */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }

    /* Hero */
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .hero-device {
        transform: scale(0.9);
    }

    /* Page Hero */
    .page-hero-content {
        gap: 2rem;
    }

    /* Grids */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Blog */
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .blog-card-featured {
        grid-column: span 2;
        grid-row: span 1;
    }

    /* Benefits */
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Reseller packages */
    .reseller-packages-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .reseller-pricing-card.popular {
        transform: none;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Channels */
    .channels-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============================================
   Desktop (1025px - 1200px)
   ============================================ */
@media (min-width: 1025px) and (max-width: 1200px) {
    .container {
        max-width: 1140px;
    }

    /* Grids */
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .pricing-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Blog */
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .blog-card-featured {
        grid-column: span 2;
        grid-row: span 2;
    }

    /* Benefits */
    .benefits-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================
   Large Desktop (> 1200px)
   ============================================ */
@media (min-width: 1201px) {
    .container {
        max-width: 1280px;
    }

    /* Hero */
    .hero-title {
        font-size: 3.5rem;
    }

    /* Full grids */
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .pricing-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Channels */
    .channels-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* ============================================
   Header & Navigation Responsive
   ============================================ */
@media (max-width: 991px) {

    /* Header */
    .site-header {
        top: 0 !important;
    }

    .promo-bar {
        display: none !important;
    }

    /* Show mobile menu toggle */
    .nav-toggle {
        display: flex !important;
    }

    /* Hide desktop nav */
    .main-nav {
        display: none !important;
    }

    .header-actions .btn {
        display: none !important;
    }

    /* Mobile nav positioning */
    .mobile-nav {
        top: 72px !important;
    }

    .site-nav {
        height: 72px;
    }

    /* Brand */
    .brand__tagline {
        display: none;
    }

    .brand__name {
        font-size: 1.125rem;
    }
}

@media (min-width: 992px) {
    .nav-toggle {
        display: none !important;
    }

    .mobile-nav {
        display: none !important;
    }
}

/* ============================================
   Floating Elements & Decorations
   ============================================ */
@media (max-width: 768px) {

    .floating-badge,
    .page-hero-floating,
    .hero-glow,
    .page-hero-glow {
        display: none !important;
    }

    .scroll-indicator {
        display: none;
    }

    /* Reduce animation on mobile for performance */
    [data-aos] {
        transition-duration: 0.3s !important;
    }
}

/* ============================================
   Form Improvements for Touch
   ============================================ */
@media (max-width: 768px) {

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px !important;
        /* Prevent iOS zoom */
        padding: 0.875rem 1rem;
    }

    .form-control,
    .form-control-pro,
    .form-select {
        font-size: 16px !important;
        min-height: 48px;
    }

    /* Better touch targets */
    .btn,
    .tab-btn,
    .category-btn,
    .nav-link,
    .faq-question {
        min-height: 44px;
    }
}

/* ============================================
   Specific Page Fixes
   ============================================ */

/* Auth Pages */
@media (max-width: 576px) {
    .auth-container {
        padding: 1rem;
    }

    .auth-card {
        border-radius: 16px;
        padding: 1.5rem;
    }

    .auth-header {
        margin-bottom: 1.5rem;
    }

    .auth-title {
        font-size: 1.5rem;
    }

    .social-login-btns {
        flex-direction: column;
    }

    .social-login-btns .btn {
        width: 100%;
    }
}

/* Checkout Page */
@media (max-width: 768px) {
    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .order-summary-card {
        position: static;
        order: -1;
        margin-bottom: 1.5rem;
    }

    .payment-methods {
        flex-direction: column;
    }

    .payment-method-card {
        width: 100%;
    }
}

/* Profile Page */
@media (max-width: 768px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }

    .profile-sidebar-pro {
        position: static;
        margin-bottom: 1.5rem;
    }

    .profile-hero-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .profile-avatar-section,
    .profile-info-section {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .profile-stats-section {
        justify-content: center;
        flex-wrap: wrap;
    }

    .tab-content-section {
        padding: 1.5rem;
    }
}

/* Contact Page */
@media (max-width: 768px) {
    .contact-layout {
        grid-template-columns: 1fr;
    }

    .contact-info-cards {
        grid-template-columns: 1fr;
    }

    .contact-map {
        height: 250px;
    }
}

/* FAQ Page */
@media (max-width: 576px) {
    .faq-categories {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.5rem;
    }

    .faq-category-btn {
        flex-shrink: 0;
    }
}

/* Channels Page */
@media (max-width: 576px) {
    .channel-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .channel-filter-btn {
        flex-shrink: 0;
    }

    .channels-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .channel-card {
        padding: 0.625rem;
    }

    .channel-logo {
        width: 40px;
        height: 40px;
    }

    .channel-name {
        font-size: 0.75rem;
    }
}

/* ============================================
   Improved Scrollbars on Touch Devices
   ============================================ */
@media (max-width: 768px) {

    /* Hide scrollbar but keep functionality */
    .blog-categories::-webkit-scrollbar,
    .pricing-tabs::-webkit-scrollbar,
    .profile-tabs::-webkit-scrollbar,
    .faq-categories::-webkit-scrollbar,
    .channel-filters::-webkit-scrollbar {
        display: none;
    }

    .blog-categories,
    .pricing-tabs,
    .profile-tabs,
    .faq-categories,
    .channel-filters {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {

    .site-header,
    .site-footer,
    .promo-bar,
    .floating-badge,
    .whatsapp-float,
    .scroll-indicator,
    .btn,
    .mobile-nav,
    nav {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .page-hero {
        background: white !important;
        color: black !important;
        padding: 2rem 0 !important;
    }

    .page-hero-title,
    .hero-title,
    .section-title {
        color: black !important;
        background: none !important;
        -webkit-text-fill-color: black !important;
    }
}

/* ============================================
   Landscape Mode Adjustments
   ============================================ */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 80px 0 40px;
    }

    .page-hero {
        min-height: auto;
        padding: 80px 0 40px;
    }

    .hero-visual,
    .page-hero-visual {
        display: none;
    }
}

/* ============================================
   High Resolution Displays
   ============================================ */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

    /* Sharper borders */
    .btn,
    .card,
    .pricing-card,
    .feature-card {
        border-width: 0.5px;
    }
}

/* ============================================
   Reduced Motion for Accessibility
   ============================================ */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    [data-aos] {
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

/* ============================================
   Dark Mode Support (if system prefers)
   ============================================ */
@media (prefers-color-scheme: dark) {
    /* Keep the current design - dark sections are already styled */
}
/* ==========================================================================
   MASTER RESPONSIVE SYSTEM (OLED EDITION)
   Comprehensive overrides for 100% device parity
   ========================================================================== */

:root {
    --container-width: 1440px;
    --gutter: 24px;
}

@media (max-width: 1536px) {
    :root { --container-width: 1280px; }
}

/* Fluid Typography Scaler */
html {
    font-size: clamp(14px, 0.9vw, 18px);
}

.container {
    width: 100%;
    max-width: var(--container-width);
    padding-left: var(--gutter);
    padding-right: var(--gutter);
    margin: 0 auto;
}

/* Section Spacing Tightening (Mobile) */
/* Section Spacing & Grid Resilience (Mobile) */
@media (max-width: 768px) {
    .portal-hero { padding: 120px 0 40px !important; }
    .metrics-bridge { padding: 50px 0 !important; }
    .feature-portal-parallax { padding: 60px 0 !important; }
    .pricing-portal { padding: 60px 0 !important; }
    .section-spacer { padding: 50px 0 !important; }
    
    .metrics-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .pricing-grid {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    .title-display {
        font-size: clamp(34px, 10vw, 48px) !important;
        line-height: 1.1 !important;
        letter-spacing: -1px !important;
        margin-bottom: 20px !important;
    }
    
    .portal-hero p {
        font-size: 16px !important;
        line-height: 1.5 !important;
        margin-bottom: 30px !important;
        padding: 0 10px;
    }

    .hero-actions-wrap {
        flex-direction: column !important;
        gap: 16px !important;
        width: 100%;
        max-width: 400px;
        margin: 20px auto 0 !important;
    }

    .btn-hero {
        width: 100% !important;
        min-width: 0 !important;
        padding: 18px 32px !important;
        font-size: 16px !important;
        border-radius: 16px !important;
    }

    /* Header Mobile Alignment Fix */
    .header-floating {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0 16px !important;
        width: calc(100% - 32px) !important;
        margin: 0 16px !important;
        height: 64px !important;
        background: rgba(10, 10, 15, 0.8) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 99px !important;
    }

    .floating-logo {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        margin-right: auto !important;
    }

    .logo-text { 
        font-size: 18px !important; 
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .floating-cluster {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        margin-left: auto !important;
    }
    
    .btn-nebula-trial span { display: none !important; }
    .btn-nebula-trial, .lang-minimal, .btn-login-nebula {
        width: 38px !important;
        height: 38px !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 50% !important;
    }
}

@media (max-width: 480px) {
    .announcement-toast {
        bottom: 10px !important;
        left: 10px !important;
        right: 10px !important;
        padding: 15px !important;
        border-radius: 20px !important;
    }
    
    .toast-icon-box {
        width: 40px !important;
        height: 40px !important;
        font-size: 18px !important;
    }

    .toast-main-text {
        font-size: 13px !important;
    }
}

@media (max-width: 480px) {
    :root { --gutter: 16px; }
    
    .title-display { font-size: clamp(36px, 18vw, 64px); letter-spacing: -2px; }
    .portal-desc-centered { font-size: 16px; margin-bottom: 32px; }
    
    .portal-features-grid-centered {
        flex-direction: column;
        width: 100%;
    }
    
    .feature-chip-premium {
        max-width: 100% !important;
        width: 100%;
        padding: 16px 20px;
    }
    
    .btn-portal {
        width: 100%;
        padding: 14px 24px;
        font-size: 14px;
    }

    /* Mega Footer Marquee scaling */
    .mega-marquee-track span {
        font-size: 80px;
        padding-right: 40px;
    }

    /* Announcement scaling */
    .announcement-toast {
        bottom: 20px !important;
        left: 20px !important;
        right: 20px !important;
        width: auto !important;
        padding: 20px !important;
    }
    .toast-icon-box { width: 44px !important; height: 44px !important; }
}

/* Large Desktop Improvements */
@media (min-width: 1920px) {
    :root { --container-width: 1600px; }
    .title-display { font-size: 160px; }
    .metric-value { font-size: 80px; }
}

/* Image & Media Resilience */
img, video, canvas {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Grid Resilience */
.row {
    margin-right: calc(var(--gutter) * -0.5);
    margin-left: calc(var(--gutter) * -0.5);
}
.col, [class*="col-"] {
    padding-right: calc(var(--gutter) * 0.5);
    padding-left: calc(var(--gutter) * 0.5);
}

/* Utility: Fluid Padding & Margins */
.section-spacer {
    padding: clamp(60px, 10vw, 160px) 0;
}
