@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;500;700;900&display=swap');

:root {
    /* Base Colors */
    --bg-color: #050505;
    --text-color: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);

    /* Rainbow/Neon Accents */
    --neon-red: #ff0055;
    --neon-orange: #ff9900;
    --neon-yellow: #ffff00;
    --neon-green: #39ff14;
    --neon-blue: #00f3ff;
    --neon-purple: #b700ff;

    /* Gradients */
    --rainbow-gradient: linear-gradient(90deg, var(--neon-red), var(--neon-orange), var(--neon-yellow), var(--neon-green), var(--neon-blue), var(--neon-purple));

    /* Spacing */
    --container-width: 1200px;
    --spacing-md: 2rem;
}

body.light-theme {
    background: #ffffff;
    /* Premium "Mesh" Gradient */
    background-image:
        radial-gradient(at 0% 0%, rgba(0, 243, 255, 0.03) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(183, 0, 255, 0.03) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(57, 255, 20, 0.03) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(255, 0, 85, 0.03) 0px, transparent 50%);
    background-attachment: fixed;
    /* Parallax-like effect */
    --text-color: #050505;
    --glass-bg: rgba(0, 0, 0, 0.03);
    /* Lighter glass */
    --glass-border: rgba(0, 0, 0, 0.08);
}

/* Base styles for About Page text (Dark Mode Default) */
.about-text,
.about-list {
    color: #ccc;
}

/* Light Theme Overrides */
body.light-theme .nav-links a {
    color: #050505;
}

body.light-theme .contact-form input,
body.light-theme .contact-form textarea {
    color: #050505;
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .service-card p,
body.light-theme .service-details li,
body.light-theme .about-text,
body.light-theme .about-list {
    color: #333;
    /* Dark text for readability */
    font-weight: 500;
}

body.light-theme .glass-panel {
    /* Softer shadow for light mode */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    /* Slight border for definition */
}

/* Light Theme: Fix Filter Buttons */
body.light-theme .filter-btn {
    color: #555;
    border-color: rgba(0, 0, 0, 0.15);
}

body.light-theme .filter-btn:hover,
body.light-theme .filter-btn.active {
    color: #fff;
    /* Keeps white text on active/hover */
}

/* Light Theme: Fix Service Cards */
body.light-theme .service-card {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    background: linear-gradient(145deg, #ffffff, #f5f7fa);
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.03);
}

body.light-theme .service-card:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* Light Theme: Stronger Text */
body.light-theme h1,
body.light-theme h2,
body.light-theme h3 {
    color: #000;
    text-shadow: none;
    /* Remove glow if it hurts readability, or keep subtle */
}

/* Ensure Logo text is visible (it has generic rainbow class, but the plain text part "Israel" if any needs checking) */
/* The logo in nav is "המרכז המדיה של ישראל" with rainbow-text class. That uses background-clip so it works on white too. */

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

html {
    overflow-y: scroll;
    /* Forces scrollbar to appear always, preventing layout jump */
    scrollbar-width: thin;
    /* Firefox */
    scrollbar-color: var(--neon-blue) var(--bg-color);
    /* Firefox */
}

body {
    font-family: 'Heebo', sans-serif;
    font-weight: 500;
    /* Thicker text */

    background-color: var(--bg-color);
    color: var(--text-color);
    direction: rtl;
    /* Hebrew Support */
    overflow-x: hidden;
    line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--neon-red), var(--neon-orange), var(--neon-yellow), var(--neon-green), var(--neon-blue), var(--neon-purple));
    border-radius: 6px;
    border: 3px solid var(--bg-color);
    /* Creates a padding effect */
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, var(--neon-purple), var(--neon-blue));
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s ease;
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.rainbow-text {
    background: var(--rainbow-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: hue-rotate 5s linear infinite;
}

/* Keyframes */
@keyframes hue-rotate {
    0% {
        filter: hue-rotate(0deg);
    }

    100% {
        filter: hue-rotate(360deg);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    0% {
        transform: translateY(-20px);
        /* Subtle slide instead of full slide */
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes blurFadeIn {
    0% {
        opacity: 0;
        filter: blur(20px);
        transform: scale(0.95);
    }

    100% {
        opacity: 1;
        filter: blur(0);
        transform: scale(1);
    }
}

.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Staggered Animation Utilities */
.stagger-1 {
    animation-delay: 100ms;
}

.stagger-2 {
    animation-delay: 200ms;
}

.stagger-3 {
    animation-delay: 300ms;
}

.stagger-4 {
    animation-delay: 400ms;
}

.stagger-5 {
    animation-delay: 500ms;
}

/* Navbar Animation (Homepage Only) - Blur Fade Concept */
.home-page .navbar {
    opacity: 0;
    animation: blurFadeIn 1.2s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    animation-delay: 0.2s;
    /* Slight initial pause */
}

/* Ensure links are visible inside the navbar animation */
.home-page .nav-links li {
    opacity: 1;
    animation: none;
    /* Disable individual link animations */
}

/* Remove Staggered Delays for Home Page to prevent "one by one" effect */
.home-page .nav-links li:nth-child(n) {
    animation-delay: 0s;
}

/* Glassmorphism */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

/* Navigation */
.navbar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: 0.3s ease;
}

.navbar.scrolled {
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    display: flex;
    justify-content: center;
    /* Centered Menu */
    align-items: center;
    width: 100%;
}

.logo {
    display: none;
    /* Keep logo hidden as requested */
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    position: relative;
    color: #fff;
    background: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    filter: none;
    text-shadow: none;
    transition: 0.3s ease;
}

.nav-links a:hover {
    transform: none;
    filter: none;
    color: #fff;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--rainbow-gradient);
    transition: 0.3s ease;
    display: block;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 243, 255, 0.15) 0%, rgba(5, 5, 5, 0) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    filter: blur(50px);
}

.hero-content {
    text-align: center;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    /* Ensure full width availability */
}

.hero-title {
    font-size: 5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #cccccc;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-block;
    padding: 1rem 3rem;
    /* Wider button */
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    border: none;
    cursor: pointer;
    margin-top: 2rem;
    /* Extra space above button */
}

.btn-primary {
    background: var(--rainbow-gradient);
    color: #000;
    /* Distinct text on bright background */
    font-weight: 800;
    border: none;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
    transition: 0.3s;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(0, 243, 255, 0.7);
    color: #000;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(5, 5, 5, 0.95);
        /* Dark theme default */
        backdrop-filter: blur(10px);
        padding: 2rem;
        text-align: center;
        border-bottom: 1px solid var(--glass-border);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    /* Mobile Menu Active State */
    .nav-links.active {
        display: flex;
        animation: slideDown 0.3s ease-out forwards;
    }

    .mobile-toggle {
        display: block;
        font-size: 2rem;
        color: var(--text-color);
    }

    /* Light Theme Mobile Menu */
    body.light-theme .nav-links {
        background: rgba(255, 255, 255, 0.95);
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-logo {
        width: 300px;
    }
}

.hero-logo {
    max-width: 90%;
    width: 750px;
    /* Reduced size from 800px */
    margin-bottom: 2rem;
    /* Reduced from 3rem because we added margin-top to btn */
    filter: drop-shadow(0 0 20px rgba(0, 243, 255, 0.3));
    animation: float 6s ease-in-out infinite, fadeInUp 1s ease-out forwards;
    /* Combined animations */
    opacity: 0;
    /* Start hidden for fadeInUp */
}

/* Page Headers */
.page-header {
    text-align: center;
    padding: 6rem 0 3rem;
}

.page-header h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 900;
}

.page-header p {
    color: #cccccc;
    font-size: 1.2rem;
}

/* Filter Section */
.filter-section {
    margin-bottom: 3rem;
}

.filter-container {
    padding: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    justify-content: space-between;
}

#serviceSearch {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    color: #fff;
    font-size: 1rem;
    width: 300px;
    outline: none;
    font-family: inherit;
}

#serviceSearch:focus {
    border-color: var(--neon-blue);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
}

.categories {
    display: flex;
    gap: 1rem;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: #ccc;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    transition: 0.3s;
    font-family: inherit;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--neon-purple);
    color: #fff;
    border-color: var(--neon-purple);
    box-shadow: 0 0 15px rgba(183, 0, 255, 0.4);
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding-bottom: 4rem;
}

.service-card {
    padding: 2rem;
    transition: 0.3s ease;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    /* Softer approach than full border */
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border-color: var(--neon-blue);
    /* Highlight on hover */
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.service-card p {
    color: #aaaaaa;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.service-details {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
}

.service-details li {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
}

.service-details li::before {
    content: '•';
    color: var(--neon-green);
    margin-left: 0.5rem;
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .filter-container {
        flex-direction: column;
        align-items: stretch;
    }

    #serviceSearch {
        width: 100%;
    }

    .categories {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Contact Page */
.contact-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    padding-bottom: 4rem;
}

.contact-form-wrapper,
.contact-info {
    padding: 2.5rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: #ccc;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    border-radius: 8px;
    color: #fff;
    font-family: 'Heebo', sans-serif;
    /* Explicit font family */
    outline: none;
    transition: 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--neon-green);
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.2);
}

.contact-info h3 {
    margin-bottom: 2rem;
    color: var(--neon-yellow);
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.info-item .icon {
    font-size: 1.5rem;
}

@media (max-width: 768px) {
    .contact-container {
        grid-template-columns: 1fr;
    }
}

/* Page Transitions */
body {
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

body.fade-out {
    opacity: 0;
}