/* MedaByte Premium Theme */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    /* Red & Black Theme */
    --background: #050505;
    --surface: #0a0a0a;
    --surface-glass: rgba(20, 20, 20, 0.7);
    --primary: #ef4444;
    /* Bright Red */
    --primary-dark: #b91c1c;
    /* Dark Red */
    --primary-glow: rgba(239, 68, 68, 0.5);
    --secondary: #991b1b;
    /* Deep Red */
    --accent: #f87171;
    /* Soft Red */
    --text-main: #ffffff;
    --text-muted: #a3a3a3;
    --border: rgba(255, 255, 255, 0.1);

    /* Effects */
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --glow-shadow: 0 0 20px var(--primary-glow);

    --font-main: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
    background-image: linear-gradient(rgba(5, 5, 5, 0.7), rgba(5, 5, 5, 0.7)), url('../img/hero-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 30px;
    height: 44px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    vertical-align: middle;
}

.btn-primary {
    /* Fallback */
    background-color: var(--primary);
    background-image: url('../img/btn-primary-bg.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 100% 100%;

    color: white;
    border: none;
    box-shadow: 0 0 15px var(--primary-glow);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px var(--primary-glow);
    filter: brightness(1.2);
}

.btn-outline {
    /* Fallback */
    background-color: rgba(255, 255, 255, 0.05);
    /* Subtle dark background */
    background-image: url('../img/btn-outline-bg.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 100% 100%;

    border: 1px solid transparent;
    color: white;
    position: relative;
    z-index: 1;
}

.btn-outline:hover {
    /* Swap to solid background on hover */
    background-image: url('../img/btn-primary-bg.png');
    background-size: 100% 100%;

    box-shadow: 0 0 15px var(--primary-glow);
    transform: translateY(-2px);
    color: white;
}

/* Glassmorphism Card */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.15);
    /* Reddish glow */
    border-color: rgba(239, 68, 68, 0.3);
}

.glass-card img {
    transition: transform 0.5s ease;
}

.glass-card:hover img {
    transform: scale(1.05);
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    letter-spacing: 1px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(239, 68, 68, 0.4), transparent 70%);
    /* Red glow */
    opacity: 0.4;
    z-index: -1;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(185, 28, 28, 0.3), transparent 70%);
    /* Dark Red glow */
    opacity: 0.3;
    z-index: -1;
}

.hero-content {
    max-width: 600px;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

/* Services / Features */
.section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 4rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}



/* .service-card:hover is now handled by .glass-card:hover */

.service-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

/* Footer */
::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 0 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px var(--primary-glow);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: white;
}

.btn-outline:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
    transform: translateY(-2px);
}

/* Glassmorphism Card */
/* Glassmorphism Card - styles merged to top of file */

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    letter-spacing: 1px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(239, 68, 68, 0.4), transparent 70%);
    /* Red glow */
    opacity: 0.4;
    z-index: -1;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(185, 28, 28, 0.3), transparent 70%);
    /* Dark Red glow */
    opacity: 0.3;
    z-index: -1;
}

.hero-content {
    max-width: 600px;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

/* Services / Features */
.section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 4rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    transition: transform 0.3s;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
}

.service-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

/* Footer Premium */
.site-footer {
    background: linear-gradient(to top, #000000, #050505);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 80px 0 30px 0;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 60px;
}

.footer-brand h3 {
    font-size: 1.8rem;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.social-icon:hover {
    background: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.3);
}

.footer-links-col h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 600;
}

.footer-links-col ul {
    list-style: none;
    padding: 0;
}

.footer-links-col ul li {
    margin-bottom: 10px;
}

.footer-links-col ul li a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.footer-links-col ul li a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

/* Product Page Layout (Desktop) */
.product-grid-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    align-items: start;
}

.product-features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    /* Navbar - Fix: Compact layout */
    nav {
        position: relative;
        /* Not sticky, scrolls away */
        background: rgba(5, 5, 5, 0.95);
        /* Solid background for readability */
        padding-bottom: 5px;
    }

    .nav-container {
        flex-direction: column;
        /* Logo top, links bottom */
        height: auto;
        padding: 10px 0;
    }

    .nav-links {
        margin-top: 10px;
        display: flex;
        flex-direction: row;
        /* Side by side */
        flex-wrap: wrap;
        /* Wrap if too many */
        justify-content: center;
        align-items: center;
        gap: 15px;
        gap: 15px;
        width: 100%;
    }

    /* Reduce glass card padding on mobile to prevent overflow */
    .glass-card {
        padding: 1rem !important;
        overflow-wrap: break-word;
        /* Ensure long words don't overflow */
        word-wrap: break-word;
    }

    .glass-card img {
        max-width: 100%;
        /* Ensure images don't overflow */
        height: auto;
    }

    .glass-card p,
    .glass-card h1,
    .glass-card h2,
    .glass-card h3 {
        hyphens: auto;
        /* improving text rendering on small screens */
    }

    .nav-links a {
        margin: 0;
        font-size: 0.9rem;
        width: auto;
        /* Width auto to fit content */
        text-align: center;
        display: inline-block;
        padding: 5px 10px;
    }

    /* Hero Section */
    .hero {
        height: auto;
        /* Allow hero to grow naturally */
        min-height: 100vh;
        padding-top: 180px;
        /* Push content down below tall navbar */
        padding-bottom: 50px;
        text-align: center;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero h1 {
        font-size: 2.2rem;
        line-height: 1.2;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    /* Stack Hero Buttons and add spacing */
    .hero .btn {
        width: 100%;
        margin: 0 !important;
        /* Reset existing margins */
        margin-bottom: 15px !important;
        /* Add space between buttons */
        display: block;
    }

    /* Product Page Layout */
    .product-grid-container {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .product-features-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    /* General Grids */

    /* General Grids */
    .grid {
        grid-template-columns: 1fr !important;
        gap: 30px;
    }

    /* Typography */
    h1 {
        font-size: 2rem !important;
    }

    h2 {
        font-size: 1.5rem !important;
    }
}

/* --- Page Transition Loader (Premium) --- */
#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    /* Deep black */
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease-in-out;
}

.loader-hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-content {
    position: relative;
    /* Removed fixed width/height to allow text to flow naturally if needed, 
       but keeping a min-size for the rings context */
    width: 120px;
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loader-rings {
    position: absolute;
    width: 100%;
    height: 100%;
    /* Ensure rings stay centered regardless of content */
    top: 0;
    left: 0;
}

.ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid transparent;
    border-radius: 50%;
}

/* Outer Ring */
.ring-1 {
    width: 100%;
    height: 100%;
    border-top: 2px solid var(--primary);
    border-bottom: 2px solid var(--secondary);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
    animation: spin-right 2s linear infinite;
}

/* Middle Ring */
.ring-2 {
    width: 70%;
    height: 70%;
    border-left: 2px solid var(--primary);
    border-right: 2px solid rgba(255, 255, 255, 0.5);
    animation: spin-left 1.5s linear infinite;
}

/* Inner Core */
.ring-3 {
    width: 40%;
    height: 40%;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    animation: pulse 2s infinite ease-in-out;
}

.loader-data {
    z-index: 2;
    display: flex;
    align-items: flex-end;
    /* Center this specifically */
    justify-content: center;
    position: absolute;
    /* Keep it dead center */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#loader-percent {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 0 10px var(--primary);
    line-height: 1;
}

.percent-symbol {
    font-size: 0.8rem;
    color: var(--primary);
    margin-bottom: 4px;
    /* Adjust alignment with big number */
    font-weight: 600;
}

.loader-text {
    z-index: 2;
    position: absolute;
    /* Position relative to the container */
    bottom: -30px;
    /* Push it outside the rings area explicitly */
    width: 300px;
    /* Wide enough to not wrap awkwardly */
    text-align: center;
    font-family: 'Courier New', monospace;
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--text-muted);
    text-transform: uppercase;
    animation: flicker 2s infinite;
}

/* Animations */
@keyframes spin-right {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes spin-left {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(-360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(0.8);
    }

    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

@keyframes flicker {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }

    52% {
        opacity: 0.2;
    }

    54% {
        opacity: 0.7;
    }
}