/* Comprehensive Responsive Fixes for All Pages */
/* This file ensures all pages are fully responsive across devices */

/* ============================================
   GLOBAL RESPONSIVE FIXES
   ============================================ */

/* Ensure all images are responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Exception for pack-image - preserve absolute positioning and custom height */
.pack-image img {
    max-width: none !important;
    height: 400px !important;
}

/* Prevent horizontal scroll */
body {
    overflow-x: hidden;
    width: 100%;
}

/* Container responsive padding */
.container {
    padding-left: 15px;
    padding-right: 15px;
}

/* ============================================
   TYPOGRAPHY - RESPONSIVE
   ============================================ */

/* Responsive headings */
h1 {
    font-size: clamp(1.8rem, 4vw, 3rem);
}

h2 {
    font-size: clamp(1.5rem, 3.5vw, 2.5rem);
}

h3 {
    font-size: clamp(1.3rem, 3vw, 2rem);
}

h4 {
    font-size: clamp(1.1rem, 2.5vw, 1.75rem);
}

/* Responsive paragraphs */
p {
    font-size: clamp(0.9rem, 2vw, 1rem);
    line-height: 1.6;
}

/* ============================================
   BUTTONS - RESPONSIVE
   ============================================ */

/* Ensure buttons are touch-friendly on mobile */
.btn, button {
    min-height: 44px;
    min-width: 44px;
    padding: 10px 20px;
    font-size: clamp(0.9rem, 2vw, 1rem);
    white-space: nowrap;
}

@media (max-width: 576px) {
    .btn, button {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .btn:last-child, button:last-child {
        margin-bottom: 0;
    }
}

/* ============================================
   FORMS - RESPONSIVE
   ============================================ */

/* Form inputs responsive */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
    width: 100%;
    max-width: 100%;
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 12px;
    box-sizing: border-box;
}

@media (max-width: 576px) {
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    textarea,
    select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

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

/* Menu responsive */
.menu {
    flex-wrap: wrap;
}

.menu li {
    margin: 5px 0;
}

@media (max-width: 768px) {
    .menu {
        flex-direction: column;
    }
    
    .menu li {
        width: 100%;
        text-align: center;
    }
    
    .menu li .link {
        padding: 15px 20px;
        display: block;
    }
}

/* ============================================
   CARDS & BOXES - RESPONSIVE
   ============================================ */

/* Cards responsive */
.card, .box-2, .yellow-box, .white-box, .feature-cards {
    width: 100%;
    margin-bottom: 20px;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .card, .box-2, .yellow-box, .white-box {
        margin-bottom: 20px;
    }
}

/* ============================================
   GRID SYSTEM - RESPONSIVE
   ============================================ */

/* Ensure columns stack on mobile */
@media (max-width: 768px) {
    [class*="col-"] {
        margin-bottom: 20px;
    }
    
    .col-md-4,
    .col-md-6,
    .col-md-8,
    .col-md-12 {
        width: 100%;
        max-width: 100%;
    }
}

/* ============================================
   HERO SECTIONS - RESPONSIVE
   ============================================ */

.about-hero,
.hero-section {
    padding: 60px 20px !important;
}

.about-hero h1,
.hero-section h1 {
    font-size: clamp(2rem, 5vw, 3.5rem) !important;
}

.about-hero p,
.hero-section p {
    font-size: clamp(1rem, 2.5vw, 1.2rem) !important;
    padding: 0 15px;
}

@media (max-width: 768px) {
    .about-hero,
    .hero-section {
        padding: 40px 15px !important;
    }
}

/* ============================================
   SECTION PADDING - RESPONSIVE
   ============================================ */

section {
    padding: 40px 0;
}

@media (max-width: 768px) {
    section {
        padding: 30px 0;
    }
}

/* ============================================
   TABLES - RESPONSIVE
   ============================================ */

/* Make tables scrollable on mobile */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    table thead,
    table tbody,
    table tr {
        display: block;
    }
    
    table td,
    table th {
        display: block;
        text-align: left;
        padding: 10px;
        border-bottom: 1px solid #ddd;
    }
}

/* ============================================
   MODALS & POPUPS - RESPONSIVE
   ============================================ */

.modal-dialog {
    margin: 10px;
    max-width: calc(100% - 20px);
}

@media (max-width: 576px) {
    .modal-dialog {
        margin: 5px;
        max-width: calc(100% - 10px);
    }
}

/* ============================================
   SPECIFIC PAGE FIXES
   ============================================ */

/* About Page */
@media (max-width: 768px) {
    .step-box {
        margin-bottom: 20px;
    }
    
    .empower-tagline {
        padding: 20px 15px !important;
        font-size: 1rem !important;
    }
}

/* VPN Features Page */
@media (max-width: 768px) {
    .section-content {
        padding: 30px 20px !important;
    }
    
    .item-data,
    .item-data2 {
        padding: 0 !important;
    }
    
    .feature-page-title h2 {
        font-size: 1.5rem !important;
    }
}

/* RDP Page */
@media (max-width: 768px) {
    .testimonials {
        padding: 30px 15px !important;
    }
    
    .testimonial-card {
        margin: 10px 0 !important;
    }
}

/* Global VPN Servers Page */
@media (max-width: 768px) {
    .server-list {
        padding: 15px !important;
    }
    
    .server-card {
        margin-bottom: 15px !important;
    }
}

/* Contact Page */
@media (max-width: 768px) {
    .contact-form {
        padding: 20px 15px !important;
    }
    
    .contact-info {
        margin-top: 30px;
    }
}

/* FAQ Page */
@media (max-width: 768px) {
    .faq-item {
        margin-bottom: 15px;
    }
    
    .faq-question {
        font-size: 1rem !important;
        padding: 15px !important;
    }
    
    .faq-answer {
        padding: 15px !important;
        font-size: 0.9rem !important;
    }
}

/* Apps Page */
@media (max-width: 768px) {
    .download-card {
        margin-bottom: 20px;
    }
    
    .app-icon {
        width: 80px !important;
        height: 80px !important;
    }
}

/* Login/Register/Recover Pages */
@media (max-width: 768px) {
    .login-form,
    .register-form,
    .recover-form {
        padding: 20px 15px !important;
        margin: 20px 10px !important;
    }
    
    .form-container {
        max-width: 100% !important;
        padding: 20px !important;
    }
}

/* Privacy Page */
@media (max-width: 768px) {
    .privacy-content {
        padding: 20px 15px !important;
    }
    
    .privacy-section {
        margin-bottom: 30px;
    }
}

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

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

/* Show only on mobile */
.show-mobile {
    display: none !important;
}

@media (max-width: 768px) {
    .show-mobile {
        display: block !important;
    }
}

/* Hide on desktop */
@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    a {
        text-decoration: underline;
    }
}

/* ============================================
   ACCESSIBILITY - RESPONSIVE
   ============================================ */

/* Ensure focus states are visible */
*:focus {
    outline: 2px solid #fcbb11;
    outline-offset: 2px;
}

/* Touch target sizes */
@media (max-width: 768px) {
    a, button, input, select, textarea {
        min-height: 44px;
        min-width: 44px;
    }
}

/* ============================================
   FIXES FOR COMMON ISSUES
   ============================================ */

/* Prevent text from being too small */
@media (max-width: 576px) {
    body {
        font-size: 16px;
    }
    
    small {
        font-size: 14px;
    }
}

/* Prevent overflow */
* {
    box-sizing: border-box;
}

/* Fix for iOS viewport */
@supports (-webkit-touch-callout: none) {
    body {
        -webkit-text-size-adjust: 100%;
    }
}

/* Ensure proper spacing on all devices */
.row {
    margin-left: -15px;
    margin-right: -15px;
}

.row > * {
    padding-left: 15px;
    padding-right: 15px;
}
