/* ===== CSS RESET & BASE ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: var(--normal-font-size);
    background-color: var(--body-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    transition: var(--transition);
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
}

input,
textarea,
select {
    font-family: inherit;
    outline: none;
}

/* ===== CSS VARIABLES ===== */
:root {
    --header-height: 4.5rem;
    
    /* Primary Colors - Tech Blue Theme */
    --primary-color: #2563eb;
    --primary-color-alt: #1d4ed8;
    --primary-color-light: #3b82f6;
    --primary-color-dark: #1e40af;
    
    /* Secondary Colors */
    --secondary-color: #06b6d4;
    --accent-color: #10b981;
    --success-color: #059669;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    /* Category Colors */
    --vpn-color: #8b5cf6;
    --vpn-color-light: #a78bfa;
    --esim-color: #06b6d4;
    --esim-color-light: #22d3ee;
    --tech-color: #f59e0b;
    --tech-color-light: #fbbf24;
    
    /* Neutral Colors */
    --white-color: #ffffff;
    --black-color: #000000;
    --body-color: #f8fafc;
    --container-color: #ffffff;
    --border-color: #e2e8f0;
    --border-color-light: #f1f5f9;
    --shadow-color: rgba(37, 99, 235, 0.1);
    
    /* Text Colors */
    --title-color: #0f172a;
    --text-color: #334155;
    --text-color-light: #64748b;
    --text-color-lighter: #94a3b8;
    --text-color-lightest: #cbd5e1;
    
    /* Typography */
    --biggest-font-size: 3.5rem;
    --h1-font-size: 2.5rem;
    --h2-font-size: 2rem;
    --h3-font-size: 1.5rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;
    --smaller-font-size: 0.75rem;
    
    /* Font Weight */
    --font-light: 300;
    --font-regular: 400;
    --font-medium: 500;
    --font-semi-bold: 600;
    --font-bold: 700;
    --font-extra-bold: 800;
    
    /* Spacing */
    --mb-0-25: 0.25rem;
    --mb-0-5: 0.5rem;
    --mb-0-75: 0.75rem;
    --mb-1: 1rem;
    --mb-1-25: 1.25rem;
    --mb-1-5: 1.5rem;
    --mb-2: 2rem;
    --mb-2-5: 2.5rem;
    --mb-3: 3rem;
    --mb-4: 4rem;
    
    /* Border Radius */
    --border-radius-sm: 0.375rem;
    --border-radius: 0.5rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;
    --border-radius-2xl: 1.5rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--primary-color-alt));
    --gradient-secondary: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    --gradient-vpn: linear-gradient(135deg, var(--vpn-color), var(--vpn-color-light));
    --gradient-esim: linear-gradient(135deg, var(--esim-color), var(--esim-color-light));
    --gradient-tech: linear-gradient(135deg, var(--tech-color), var(--tech-color-light));
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Z-index */
    --z-tooltip: 10;
    --z-fixed: 100;
    --z-modal: 1000;
    --z-overlay: 1001;
}

/* Dark theme variables */
[data-theme="dark"] {
    --body-color: #0f172a;
    --container-color: #1e293b;
    --border-color: #334155;
    --border-color-light: #475569;
    --title-color: #f1f5f9;
    --text-color: #cbd5e1;
    --text-color-light: #94a3b8;
    --text-color-lighter: #64748b;
    --text-color-lightest: #475569;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

/* ===== RESPONSIVE TYPOGRAPHY ===== */
@media screen and (max-width: 992px) {
    :root {
        --biggest-font-size: 2.75rem;
        --h1-font-size: 2rem;
        --h2-font-size: 1.75rem;
        --h3-font-size: 1.25rem;
        --normal-font-size: 0.938rem;
        --small-font-size: 0.813rem;
        --smaller-font-size: 0.75rem;
    }
}

/* ===== REUSABLE CSS CLASSES ===== */
.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.grid {
    display: grid;
}

.section {
    padding: 6rem 0 3rem;
}

.section__header {
    text-align: center;
    margin-bottom: var(--mb-4);
}

.section__title {
    font-size: var(--h2-font-size);
    color: var(--title-color);
    font-weight: var(--font-bold);
    margin-bottom: var(--mb-1);
    position: relative;
}

.section__title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 4rem;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: var(--border-radius);
}

.section__description {
    font-size: 1.125rem;
    color: var(--text-color-light);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ===== LANGUAGE SWITCHER ===== */
.language-switcher {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: var(--z-tooltip);
    display: flex;
    background-color: var(--container-color);
    border-radius: var(--border-radius-lg);
    padding: 0.25rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    gap: 0.125rem;
}

.lang-btn {
    padding: 0.5rem 0.75rem;
    border: none;
    background: transparent;
    color: var(--text-color-light);
    font-size: var(--small-font-size);
    font-weight: var(--font-medium);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 2.5rem;
    text-align: center;
}

.lang-btn:hover {
    background-color: var(--border-color);
    color: var(--text-color);
    transform: translateY(-1px);
}

.lang-btn.active {
    background-color: var(--primary-color);
    color: var(--white-color);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
    padding: 0.75rem;
    border: none;
    background-color: var(--container-color);
    color: var(--text-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.theme-toggle:hover {
    background-color: var(--border-color);
    transform: scale(1.05);
}

/* Dark mode toggle icon */
.dark-theme .theme-toggle i {
    transform: rotate(180deg);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-size: var(--normal-font-size);
    font-weight: var(--font-medium);
    border-radius: var(--border-radius-lg);
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn--primary {
    background: var(--gradient-primary);
    color: var(--white-color);
    box-shadow: var(--shadow-md);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn--secondary {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn--secondary:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.btn--outline {
    background-color: transparent;
    color: var(--text-color);
    border-color: var(--border-color);
}

.btn--outline:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
    border-color: var(--primary-color);
}

.btn--large {
    padding: 1.125rem 2.25rem;
    font-size: 1.125rem;
}

.btn--block {
    width: 100%;
}

.btn i {
    font-size: 1.125rem;
}

/* ===== HEADER & NAVIGATION ===== */
.header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-fixed);
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.scroll-header {
    box-shadow: var(--shadow-lg);
}

.nav {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav__logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: var(--font-bold);
    color: var(--title-color);
    font-size: 1.5rem;
}

.nav__logo-icon {
    font-size: 1.75rem;
    color: var(--primary-color);
}

.nav__logo-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav__menu {
    position: relative;
}

.nav__list {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav__item {
    position: relative;
}

.nav__link {
    color: var(--text-color);
    font-weight: var(--font-medium);
    transition: var(--transition);
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0;
}

.nav__link:hover,
.nav__link.active-link {
    color: var(--primary-color);
}

.nav__link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background: var(--gradient-primary);
    transition: var(--transition);
}

.nav__link:hover::after,
.nav__link.active-link::after {
    width: 100%;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown__menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--container-color);
    min-width: 200px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: var(--z-tooltip);
    padding: 0.5rem 0;
}

.dropdown:hover .dropdown__menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown__menu li {
    margin: 0;
}

.dropdown__menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-color);
    font-weight: var(--font-regular);
    transition: var(--transition);
}

.dropdown__menu a:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.nav__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav__toggle,
.nav__close {
    display: none;
    font-size: 1.5rem;
    color: var(--title-color);
    cursor: pointer;
}

/* ===== HERO SECTION ===== */
.hero {
    padding-top: calc(var(--header-height) + 4rem); /* Adjusted padding-top */
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23e2e8f0" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
    z-index: -1;
}

.hero__container {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero__content {
    z-index: 1;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-2xl);
    font-size: var(--small-font-size);
    font-weight: var(--font-medium);
    margin-bottom: var(--mb-2);
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.hero__title {
    font-size: clamp(2.5rem, 5vw, 4rem); /* Responsive font size */
    font-weight: var(--font-extra-bold);
    color: var(--title-color);
    line-height: 1.1;
    margin-bottom: var(--mb-2); /* Adjusted margin */
}

.hero__title span {
    display: block;
}

.hero__title-accent {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__description {
    font-size: clamp(1.125rem, 2.5vw, 1.375rem); /* Responsive font size */
    color: var(--text-color-light);
    margin-bottom: var(--mb-3); /* Adjusted margin */
    max-width: 500px;
    line-height: 1.6;
}

.hero__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: var(--mb-3);
    padding: 2rem; /* Adjusted padding */
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-2xl);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero__stat {
    text-align: center;
}

.hero__stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: var(--font-extra-bold);
    color: var(--primary-color);
    line-height: 1;
}

.hero__stat-text {
    font-size: var(--small-font-size);
    color: var(--text-color-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: var(--font-medium);
}

.hero__buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: var(--mb-2);
}

.hero__disclosure {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background-color: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--border-radius-lg);
    font-size: var(--small-font-size);
    color: var(--warning-color);
}

.hero__disclosure i {
    font-size: 1.125rem;
    flex-shrink: 0;
}

.hero__image {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.hero__image-wrapper {
    position: relative;
    width: 100%;
    max-width: 500px;
}

.hero__img {
    width: 100%;
    height: auto; /* Ensure auto height */
    filter: drop-shadow(0 20px 40px rgba(37, 99, 235, 0.15));
    animation: float 6s ease-in-out infinite;
}

.hero__floating-cards {
    position: absolute;
    top: 20%; /* Adjusted for higher position */
    left: 0;
    right: 0;
    width: 100%;
    height: 60%;
    pointer-events: none; /* Allows clicks to pass through */
    z-index: 1;
}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.95); /* Semi-transparent background */
    backdrop-filter: blur(10px); /* Blur effect */
    padding: 0.75rem 1.25rem; /* Adjusted padding */
    border-radius: var(--border-radius-lg);
    font-size: var(--small-font-size);
    font-weight: var(--font-medium);
    color: var(--text-color);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: floatCard 6s ease-in-out infinite;
    z-index: 2; /* Ensures cards are above the image */
}

.floating-card--vpn {
    top: 15%; /* Adjusted for higher position */
    left: 5%;
    animation-delay: 0s;
    color: var(--vpn-color);
    border-color: rgba(139, 92, 246, 0.3);
}

.floating-card--esim {
    top: 25%; /* Adjusted for higher position */
    right: 8%;
    animation-delay: 2s; /* Adjusted delay */
    color: var(--esim-color);
    border-color: rgba(6, 182, 212, 0.3);
}

.floating-card--tech {
    top: 45%; /* Adjusted for higher position */
    right: 15%;
    animation-delay: 4s; /* Adjusted delay */
    color: var(--tech-color);
    border-color: rgba(245, 158, 11, 0.3);
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes floatCard {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-15px) rotate(1deg); }
    66% { transform: translateY(-8px) rotate(-1deg); }
}

/* ===== HERO IMAGE SVG (if used directly) ===== */
.hero__image-svg {
    width: 100%;
    max-width: 500px;
    height: auto;
}

.floating-element {
    animation: floatSVG 4s ease-in-out infinite;
}

.vpn-element { animation-delay: 0s; }
.esim-element { animation-delay: 1.5s; }
.tech-element { animation-delay: 3s; }
.comparison-center { animation: pulse 3s ease-in-out infinite; }

@keyframes floatSVG {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
    }
    50% { 
        transform: translateY(-10px) rotate(2deg); 
    }
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1); 
    }
    50% { 
        opacity: 0.8; 
        transform: scale(1.05); 
    }
}

/* ===== SERVICE CARD HOVER EFFECT ===== */
.service__card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.service__card:hover {
    transform: translateY(-15px);
    border-color: var(--primary-color);
    box-shadow: 0 25px 50px -12px rgba(37, 99, 235, 0.25);
}

.service__card[data-category="vpn"]:hover {
    border-color: var(--vpn-color);
}

.service__card[data-category="esim"]:hover {
    border-color: var(--esim-color);
}

.service__card[data-category="tech"]:hover {
    border-color: var(--tech-color);
}

/* ===== FOOTER ===== */
.footer {
    background-color: var(--title-color);
    color: var(--white-color);
    padding: 4rem 0 2rem;
}

.footer__container {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: var(--mb-3);
}

.footer__brand {
    max-width: 350px;
}

.footer__logo {
    font-size: 1.75rem;
    font-weight: var(--font-bold);
    margin-bottom: var(--mb-1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer__logo i {
    color: var(--primary-color);
}

.footer__description {
    color: #cbd5e1;
    line-height: 1.7;
    margin-bottom: var(--mb-2);
}

.footer__social {
    display: flex;
    gap: 1rem;
}

.footer__social-link {
    width: 3rem;
    height: 3rem;
    background-color: #334155;
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    transition: var(--transition);
    font-size: 1.25rem;
}

.footer__social-link:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
    transform: translateY(-3px);
}

.footer__title {
    font-size: var(--h3-font-size);
    font-weight: var(--font-bold);
    margin-bottom: var(--mb-1-5);
    color: var(--white-color);
}

.footer__links {
    display: grid;
    gap: 0.875rem;
}

.footer__link {
    color: #cbd5e1;
    transition: var(--transition);
    font-size: var(--normal-font-size);
}

.footer__link:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--mb-2);
    border-top: 1px solid #334155;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer__copy {
    color: #94a3b8;
    font-size: var(--small-font-size);
}

.footer__legal {
    text-align: right;
}

.affiliate-notice {
    color: #94a3b8;
    font-size: var(--smaller-font-size);
    font-style: italic;
}

/* ===== SCROLL UP ===== */
.scrollup {
    position: fixed;
    right: 1.5rem;
    bottom: -20%; /* Hidden by default */
    background: var(--gradient-primary);
    opacity: 0.9;
    padding: 0.75rem;
    border-radius: var(--border-radius-lg);
    z-index: var(--z-tooltip);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
}

.scrollup:hover {
    opacity: 1;
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.scrollup i {
    font-size: 1.5rem;
    color: var(--white-color);
}

/* Show scroll */
.show-scroll {
    bottom: 3rem;
}

/* ===== NOTIFICATION SYSTEM ===== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: var(--z-overlay);
    max-width: 400px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    transform: translateX(100%);
    transition: var(--transition);
}

.notification--success {
    background-color: var(--success-color);
    color: var(--white-color);
}

.notification--error {
    background-color: var(--error-color);
    color: var(--white-color);
}

.notification--info {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.notification__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
}

.notification__message {
    flex: 1;
    margin-right: 1rem;
}

.notification__close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.notification__close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* ===== LOADING STATES ===== */
.loading {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== SCROLL ANIMATIONS ===== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.m-0 { margin: 0; }
.p-0 { padding: 0; }

.overflow-hidden { overflow: hidden; }
.position-relative { position: relative; }
.position-absolute { position: absolute; }
.position-fixed { position: fixed; }

/* ===== MODAL STYLES ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal__content {
    background-color: var(--container-color);
    border-radius: var(--border-radius-xl);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: var(--transition);
}

.modal.active .modal__content {
    transform: scale(1);
}

.modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--mb-2);
    padding-bottom: var(--mb-1);
    border-bottom: 1px solid var(--border-color);
}

.modal__title {
    font-size: var(--h3-font-size);
    font-weight: var(--font-bold);
    color: var(--title-color);
}

.modal__close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color-light);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.modal__close:hover {
    background-color: var(--border-color);
    color: var(--title-color);
}

.modal__body {
    color: var(--text-color);
    line-height: 1.6;
}

/* ===== COMPARISON TABLE ===== */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--mb-2) 0;
    background-color: var(--container-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.comparison-table th {
    background-color: var(--body-color);
    font-weight: var(--font-semi-bold);
    color: var(--title-color);
    font-size: var(--small-font-size);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comparison-table td {
    color: var(--text-color);
}

.comparison-table tr:hover {
    background-color: var(--body-color);
}

.comparison-table .feature-check {
    color: var(--success-color);
    font-weight: var(--font-bold);
}

.comparison-table .feature-cross {
    color: var(--error-color);
    font-weight: var(--font-bold);
}

/* ===== RATING SYSTEM ===== */
.rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.rating__star {
    font-size: 1.125rem;
    color: var(--warning-color);
}

.rating__star.empty {
    color: var(--border-color);
}

.rating__value {
    margin-left: 0.5rem;
    font-weight: var(--font-medium);
    color: var(--text-color);
}

/* ===== PRICE DISPLAY ===== */
.price {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.price__currency {
    font-size: var(--small-font-size);
    color: var(--text-color-light);
}

.price__amount {
    font-size: var(--h3-font-size);
    font-weight: var(--font-bold);
    color: var(--title-color);
}

.price__period {
    font-size: var(--small-font-size);
    color: var(--text-color-light);
}

.price--discount {
    position: relative;
}

.price--discount .price__original {
    text-decoration: line-through;
    color: var(--text-color-lighter);
    font-size: var(--small-font-size);
}

.price--discount .price__discount-badge {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    background-color: var(--error-color);
    color: var(--white-color);
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    font-size: var(--smaller-font-size);
    font-weight: var(--font-bold);
}

/* ===== RESPONSIVE DESIGN ===== */

/* Large devices (992px and down) */
@media screen and (max-width: 992px) {
    .container {
        margin-left: var(--mb-1-5);
        margin-right: var(--mb-1-5);
    }
    
    .hero__container,
    .newsletter__container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hero__image {
        order: -1;
    }
    
    .hero__stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    
    .services__container,
    .tools__container {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .comparison__filters {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .newsletter__input-group {
        flex-direction: column;
    }
    
    .newsletter__input,
    .newsletter__button {
        width: 100%;
    }
    
    .floating-card--vpn {
        right: 0%;
    }
    
    .floating-card--esim {
        left: -5%;
    }
    
    .floating-card--tech {
        right: 5%;
    }
}

/* Medium devices (768px and down) */
@media screen and (max-width: 768px) {
    .language-switcher {
        top: 0.5rem;
        right: 0.5rem;
        padding: 0.125rem;
    }
    
    .lang-btn {
        padding: 0.375rem 0.625rem;
        font-size: var(--smaller-font-size);
    }
    
    .nav__menu {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--container-color);
        padding: 2rem 1rem;
        transition: left 0.3s ease;
        box-shadow: var(--shadow-xl);
        z-index: var(--z-modal);
        overflow-y: auto;
    }
    
    .nav__list {
        flex-direction: column;
        gap: 0;
        margin-top: 3rem; /* Added margin for mobile menu content */
    }
    
    .nav__item {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav__link {
        font-size: 1.125rem;
        padding: 1rem 0;
        border-bottom: 0; /* Removed border here, added to nav__item */
        justify-content: space-between;
        width: 100%;
        color: var(--text-color); /* Ensure text color */
    }
    
    .dropdown__menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background-color: var(--body-color);
        margin-left: 1rem;
        margin-top: 0.5rem;
        border-radius: var(--border-radius);
        max-height: 0; /* Controlled by JS for dropdown toggle */
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .dropdown.active .dropdown__menu {
        max-height: 300px; /* Max height for open dropdown */
        padding: 0.5rem 0;
    }

    .dropdown__menu a {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    .nav__close,
    .nav__toggle {
        display: block;
    }
    
    .nav__close {
        position: absolute;
        top: 1rem;
        right: 1rem;
        font-size: 2rem;
        z-index: 1001; /* Ensure it's above other elements */
    }
    
    .show-menu {
        left: 0;
    }
    
    .hero {
        padding-top: calc(var(--header-height) + 2rem);
    }
    
    .hero__buttons {
        flex-direction: column;
    }
    
    .hero__stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    .hero__floating-cards {
        display: none; /* Hide floating cards on mobile */
    }
    
    .services__container,
    .tools__container {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }
    
    .service__card--featured {
        transform: none;
    }
    
    .service__card--featured:hover {
        transform: translateY(-10px);
    }
    
    .comparison__filters {
        padding: 2rem 1.5rem;
    }
    
    .newsletter__input-group {
        flex-direction: column;
    }
    
    .newsletter__input,
    .newsletter__button {
        width: 100%;
    }
    
    .footer__container {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .footer__bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer__legal {
        text-align: center;
    }
    
    .modal__content {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .comparison-table {
        font-size: var(--small-font-size);
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 0.75rem 0.5rem;
    }

    /* Force display of nav actions on mobile if needed in header, but hidden in mobile menu */
    .nav__actions .btn {
        /* This hides buttons like "Get Updates" when the mobile menu is active */
        display: none; 
    }
    .nav__actions .theme-toggle {
        /* This hides the theme toggle in nav actions when mobile menu is active */
        display: none;
    }

    /* Only show nav toggle on mobile */
    .nav__toggle {
        display: block !important;
        order: 3; /* To place it correctly in flex container */
    }
}

/* Small devices (576px and down) */
@media screen and (max-width: 576px) {
    .container {
        margin-left: var(--mb-1);
        margin-right: var(--mb-1);
    }
    
    .section {
        padding: 4rem 0 2rem;
    }
    
    .hero__stats {
        grid-template-columns: 1fr;
        padding: 1rem 0;
    }
    
    .hero__stat-number {
        font-size: 2rem;
    }
    
    .service__card,
    .tool__card {
        padding: 2rem 1.5rem;
    }
    
    .service__providers,
    .service__categories {
        padding: 1rem;
    }
    
    .provider-logos {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }
    
    .tech-categories {
        justify-content: center;
    }
    
    .comparison__filters {
        padding: 1.5rem 1rem;
        gap: 1rem;
    }
    
    .newsletter__container {
        gap: 2rem;
    }
    
    .newsletter__input-group {
        gap: 0.75rem;
    }
    
    .footer__container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer__brand {
        max-width: none;
    }
    
    .footer__social {
        justify-content: center;
    }
    
    .scrollup {
        right: 1rem;
        padding: 0.625rem;
    }
    
    .scrollup i {
        font-size: 1.25rem;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Extra small devices (350px and down) */
@media screen and (max-width: 350px) {
    .container {
        margin-left: var(--mb-0-75);
        margin-right: var(--mb-0-75);
    }
    
    .hero__buttons {
        gap: 0.75rem;
    }
    
    .btn {
        padding: 0.75rem 1rem;
        font-size: var(--small-font-size);
    }
    
    .btn--large {
        padding: 0.875rem 1.25rem;
        font-size: var(--normal-font-size);
    }
    
    .service__card,
    .tool__card {
        padding: 1.5rem 1rem;
    }
    
    .comparison__filters {
        padding: 1rem;
    }
    
    .newsletter__input,
    .newsletter__button {
        padding: 0.875rem 1rem;
    }
    
    .modal__content {
        padding: 1rem;
        margin: 0.5rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 0.5rem 0.25rem;
        font-size: var(--smaller-font-size);
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .header,
    .nav__toggle,
    .nav__close,
    .scrollup,
    .newsletter,
    .language-switcher,
    .theme-toggle {
        display: none;
    }
    
    .hero {
        padding-top: 0;
        min-height: auto;
    }
    
    .hero__floating-cards {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
    }
    
    .section {
        padding: 1rem 0;
        page-break-inside: avoid;
    }
    
    .service__card,
    .tool__card {
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
    
    .btn {
        border: 1px solid #000;
        color: #000;
        background: transparent;
    }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero__img,
    .floating-card {
        animation: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000;
        --text-color-light: #000;
        --shadow-color: rgba(0, 0, 0, 0.5);
    }
    
    .btn--outline {
        border-width: 2px;
    }
    
    .service__card,
    .tool__card {
        border-width: 2px;
    }
}

/* ===== FOCUS STYLES FOR ACCESSIBILITY ===== */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn:focus,
.nav__link:focus,
.filter-select:focus,
.newsletter__input:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===== SELECTION STYLES ===== */
::selection {
    background-color: var(--primary-color);
    color: var(--white-color);
}

::-moz-selection {
    background-color: var(--primary-color);
    color: var(--white-color);
}

/* ===== SCROLLBAR STYLES ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background-color: var(--border-color);
}

::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: var(--border-radius);
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary-color-alt);
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.hero__img,
.newsletter__img,
.provider-logo {
    will-change: transform;
}

.service__card,
.tool__card,
.btn {
    will-change: transform, box-shadow;
}

/* ===== FINAL ANIMATIONS ===== */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading-pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes slideInFromTop {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.slide-in-top {
    animation: slideInFromTop 0.5s ease-out;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.bounce-in {
    animation: bounceIn 0.6s ease-out;
}

/* ===== DARK MODE SPECIFIC ADJUSTMENTS ===== */
[data-theme="dark"] .header {
    background-color: rgba(30, 41, 59, 0.95);
    border-bottom-color: #475569;
}

[data-theme="dark"] .nav__logo-text {
    background: linear-gradient(135deg, #60a5fa, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="dark"] .hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

[data-theme="dark"] .hero::before {
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23475569" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
}

[data-theme="dark"] .services,
[data-theme="dark"] .tools {
    background-color: var(--container-color);
}

[data-theme="dark"] .comparison-preview {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

[data-theme="dark"] .language-switcher {
    background-color: var(--container-color);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .lang-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .hero__stats {
    background: rgba(30, 41, 59, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .floating-card {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .newsletter {
    background: linear-gradient(135deg, var(--primary-color-dark) 0%, var(--secondary-color) 100%);
}

[data-theme="dark"] .newsletter::before {
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
}

[data-theme="dark"] .newsletter__input {
    background-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .comparison-table th {
    background-color: var(--border-color);
}

[data-theme="dark"] .comparison-table tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .hero__img line {
    stroke: #475569;
}

[data-theme="dark"] .hero__img text {
    fill: currentColor;
}