/* ========================================
   POLYMER PRO - Main Stylesheet
   A professional headlight restoration service
   ======================================== */

/* ---- CORE VARIABLES ---- */
:root {
    --bg: #050507;
    --text: #ffffff;
    --primary: #00f2ff;
    --secondary: #7000ff;
    --glass: rgba(255, 255, 255, 0.05);
    --border: rgba(0, 242, 255, 0.2);
    --card-bg: #0f0f12;
}

[data-theme="light"] {
    --bg: #f4f7f6;
    --text: #1a1a1a;
    --glass: rgba(0, 0, 0, 0.05);
    --border: rgba(0, 0, 0, 0.1);
    --card-bg: #ffffff;
}

/* ---- GLOBAL STYLES ---- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Rajdhani', sans-serif;
    overflow-x: hidden;
}

h1,
h2,
h3,
.logo {
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ---- NAVIGATION ---- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(5, 5, 7, 0.85);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border);
}

/* Light mode navigation */
[data-theme="light"] nav {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text);
}

.logo span {
    color: var(--primary);
}

.logo-img {
    display: inline-flex;
    align-items: center;
}

.logo-img img {
    filter: drop-shadow(0 0 12px rgba(0, 242, 255, 0.25));
}

/* Light mode logo adjustments */
[data-theme="light"] .logo-img img {
    filter: drop-shadow(0 0 8px rgba(0, 242, 255, 0.15));
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 1.30rem;
    text-transform: uppercase;
}

.nav-links a:hover {
    color: var(--primary);
}

.lang-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    font-size: 16px;
    line-height: 1;
    background: rgba(255, 255, 255, 0.06);
}

/* Light mode language flags */
[data-theme="light"] .lang-flag {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.15);
}

.lang-flag:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
}

.lang-flag img {
    width: 22px;
    height: 16px;
    display: block;
}

/* ---- THEME TOGGLE BUTTON ---- */
.theme-toggle {
    background: var(--glass);
    border: 2px solid var(--border);
    width: 60px;
    height: 34px;
    border-radius: 50px;
    cursor: pointer;
    position: relative;
    padding: 0;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.theme-toggle:hover {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.3);
    transform: scale(1.05);
}

/* The sliding circle */
.theme-toggle-slider {
    position: absolute;
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, #4a4a5e 0%, #2a2a3e 100%);
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="light"] .theme-toggle-slider {
    left: 30px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.4);
}

/* Icons inside slider */
.theme-toggle-slider svg {
    width: 14px;
    height: 14px;
    color: #fff;
}

/* Moon icon - visible in dark mode */
.slider-icon-moon {
    display: block;
}

.slider-icon-sun {
    display: none;
}

/* Sun icon - visible in light mode */
[data-theme="light"] .slider-icon-moon {
    display: none;
}

[data-theme="light"] .slider-icon-sun {
    display: block;
    color: #000;
}

/* Hide the side icons completely */
.theme-icon {
    display: none;
}

/* ---- HERO SECTION ---- */
.hero {
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: #000;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    z-index: 0;
    filter: none;
}

[data-theme="light"] .hero-video {
    opacity: 1;
    filter: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* Light mode hero text */
[data-theme="light"] .hero-content h1 {
    color: #ffffff;
    text-shadow: 0 0 18px rgba(0, 242, 255, 0.35), 0 2px 8px rgba(0, 0, 0, 0.45);
}

.hero-content p {
    font-size: 1.2rem;
    letter-spacing: 4px;
    margin-bottom: 30px;
    opacity: 0.8;
}

[data-theme="light"] .hero-content p {
    color: #ffffff;
    opacity: 0.95;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}

/* ---- BUTTONS ---- */
.btn-neon {
    padding: 15px 40px;
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    font-family: 'Orbitron';
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 0 10px var(--primary);
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-neon:hover {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 40px var(--primary);
}

/* Light mode button adjustments */
[data-theme="light"] .btn-neon {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.3);
}

[data-theme="light"] .btn-neon:hover {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.5);
}

/* ---- SECTIONS ---- */
.section {
    padding: 100px 10%;
}

.section-title {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 60px;
    color: var(--primary);
}

/* ---- GRID & CARDS ---- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 15px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

/* ---- GALLERY CAROUSEL (Frontend Homepage) ---- */
.gallery-carousel {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.gc-viewport {
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.25);
}

.gc-track {
    display: flex;
    width: 100%;
    transform: translateX(0);
    transition: transform 600ms ease;
}

.gc-slide {
    min-width: 100%;
    padding: 18px;
}

.gc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.gc-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.gc-media {
    width: 100%;
    height: 260px;
    display: block;
    object-fit: cover;
    background: #000;
}

.gc-meta {
    padding: 14px 16px;
    border-top: 1px solid var(--border);
}

.gc-meta h3 {
    font-size: 1rem;
    margin: 0;
    color: var(--text);
}

.gc-controls {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.gc-btn {
    pointer-events: all;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--primary);
    background: rgba(0, 0, 0, 0.45);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(0, 242, 255, 0.35);
}

.gc-btn:hover {
    background: rgba(0, 242, 255, 0.12);
}

.gc-prev {
    left: 10px;
}

.gc-next {
    right: 10px;
}

.gc-dots {
    display: flex;
    gap: 0;
    justify-content: center;
    align-items: center;
    margin-top: 18px;
    flex-wrap: wrap;
}

.gc-dot {
    position: relative;
    width: 10px;
    height: 10px;
    padding: 19px;
    box-sizing: content-box;
    border: 0;
    background: transparent;
    opacity: 1;
    cursor: pointer;
    border-radius: 50%;
    display: inline-block;
    margin: 0;
}

.gc-dot::before {
    content: "";
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid var(--primary);
    background: transparent;
    opacity: 0.55;
}

.gc-dot.active::before,
.gc-dot[aria-current="true"]::before {
    background: var(--primary);
    opacity: 1;
}

.gc-dot:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ---- BOOKING FORM ---- */
.booking-container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--glass);
    padding: 50px 40px;
    border-radius: 20px;
    border: 1px solid var(--primary);
    box-shadow: 0 10px 40px rgba(0, 242, 255, 0.15);
}

.booking-title {
    text-align: center;
    margin: 0 0 40px 0;
    font-family: 'Orbitron', sans-serif;
    color: var(--primary);
    font-size: 2rem;
    letter-spacing: 2px;
}

.booking-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

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

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #a9b0c2;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-label i {
    color: var(--primary);
    font-size: 1rem;
}

.form-label .optional {
    color: #666;
    font-weight: 400;
    font-style: italic;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.4);
    border: 1.5px solid var(--border);
    color: #fff;
    border-radius: 8px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.3);
    background: rgba(0, 0, 0, 0.5);
}

.form-control::placeholder {
    color: #666;
}

.textarea-notes,
.textarea-address {
    min-height: 100px;
    resize: vertical;
}

.btn-submit {
    width: 100%;
    padding: 16px 40px;
    margin-top: 10px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-submit i {
    font-size: 1.2rem;
}

/* Responsive booking form */
@media (max-width: 768px) {
    .booking-container {
        padding: 35px 25px;
    }

    .booking-form {
        grid-template-columns: 1fr;
    }

    .form-group.full-width {
        grid-column: 1;
    }

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

[data-theme="light"] .booking-container {
    background: #eafcff;
    border-color: rgba(0, 242, 255, 0.28);
    box-shadow: 0 10px 40px rgba(0, 242, 255, 0.10);
}

[data-theme="light"] .booking-title {
    color: #111111;
}

[data-theme="light"] .form-label {
    color: #111111;
}

[data-theme="light"] .form-label .optional {
    color: #444444;
}

[data-theme="light"] .form-control {
    background: #ffffff;
    color: #111111;
    border: 1.5px solid rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .form-control:focus {
    background: #ffffff;
    color: #111111;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.18);
}

[data-theme="light"] .form-control::placeholder {
    color: #666666;
}

/* ---- FOOTER ---- */
footer {
    background: #030305;
    padding: 80px 10% 30px;
    border-top: 2px solid var(--primary);
    margin-top: 50px;
}

/* Light mode footer */
[data-theme="light"] footer {
    background: #f8f9fa;
    border-top-color: var(--primary);
}

[data-theme="light"] .footer-col h3 {
    color: var(--primary);
}

[data-theme="light"] .footer-col p,
[data-theme="light"] .footer-col a {
    color: #333;
}

[data-theme="light"] .footer-col a:hover {
    color: var(--primary);
}

[data-theme="light"] .social-icons a {
    background: rgba(0, 0, 0, 0.05);
    border-color: var(--primary);
    color: var(--primary);
}

[data-theme="light"] .social-icons a:hover {
    background: var(--primary);
    color: #fff;
}

[data-theme="light"] .map-frame {
    filter: none;
    opacity: 0.9;
}

[data-theme="light"] .footer-bottom {
    border-top-color: rgba(0, 0, 0, 0.1);
    color: #666;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 50px;
}

.footer-col h3 {
    color: var(--primary);
    margin-bottom: 25px;
    font-size: 1.1rem;
}

.footer-col p,
.footer-col a {
    color: #ccc;
    text-decoration: none;
    margin-bottom: 12px;
    display: block;
    font-size: 0.95rem;
}

.footer-col a:hover {
    color: var(--primary);
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    background: var(--glass);
    border: 1px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--primary);
    font-size: 1.2rem;
}

.social-icons a:hover {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 15px var(--primary);
}

.map-frame {
    width: 100%;
    height: 150px;
    border: 1px solid var(--primary);
    border-radius: 10px;
    filter: grayscale(1) invert(0.9);
}

.footer-bottom {
    text-align: center;
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.8rem;
    opacity: 0.5;
}

/* ---- RESPONSIVE DESIGN ---- */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

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

    .gc-media {
        height: 240px;
    }
}

@media (max-width: 600px) {
    .section-title {
        font-size: 1.65rem;
        letter-spacing: 1px;
        padding: 0 10px;
        overflow-wrap: anywhere;
        word-break: break-word;
        max-width: 100%;
    }

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

    .nav-links {
        display: none;
    }

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

    .gc-media {
        height: 240px;
    }

    /* egalizează marginile pe mobil */
    .section {
        padding-left: 16px;
        padding-right: 19px;
    }

    /* centrează grid-ul și cardul perfect */
    .grid {
        justify-items: center;
    }

    .grid .card {
        width: 100%;
        max-width: 520px;
    }
}

/* ---- ADDITIONAL UTILITY CLASSES ---- */

/* Logo image styling */
.logo-image {
    display: block;
    object-fit: contain;
}

/* Language switcher */
.lang-switch {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Card icons */
.card-icon {
    color: var(--primary);
    margin-bottom: 20px;
}

/* Gallery section background */
.section-gallery {
    background: rgba(0, 0, 0, 0.2);
}

/* Empty gallery card */
.empty-gallery-card {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.empty-gallery-title {
    color: var(--primary);
    margin-bottom: 10px;
}

.empty-gallery-desc {
    opacity: .8;
}

/* Gallery more button container */
.gallery-more-btn {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

/* Booking form elements */
.textarea-notes {
    min-height: 90px;
}

.textarea-address {
    min-height: 90px;
}

.btn-submit {
    width: 100%;
    margin-top: 10px;
}

/* Footer elements */
.footer-logo {
    margin-bottom: 20px;
}

.footer-logo img {
    display: block;
    max-width: 320px;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.footer-logo-text {
    margin-bottom: 20px;
}

.staff-link {
    color: var(--primary);
}

/* Calendar icon (input[type="date"]) -> ALB (Chrome/Edge/Safari) */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 1;
    cursor: pointer;
}

/* ---- ACCESSIBILITY / CONTRAST IMPROVEMENTS ---- */
.optional {
    color: #d7e3ea !important;
    opacity: 1 !important;
}

[data-theme="dark"] .booking-container,
[data-theme="dark"] .booking-container .booking-title,
[data-theme="dark"] .booking-container .form-label,
[data-theme="dark"] .booking-container p,
[data-theme="dark"] .booking-container label,
[data-theme="dark"] .booking-container .form-control,
[data-theme="dark"] .booking-container .form-control::placeholder {
    color: #f2f7fb;
}

.booking-container .form-control::placeholder {
    opacity: .82;
}

[data-theme="light"] .optional {
    color: #4a5568 !important;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (min-width: 220px){
  html:not([data-theme="light"]) .hero-content h1{
    font-size: 2.4rem !important;
    line-height: 1.05;
    color: #FFFFFF !important;
    text-shadow:
      0 0 8px rgba(0,242,255,.55),
      0 0 18px rgba(0,242,255,.40),
      0 0 32px rgba(0,242,255,.25);
  }

  html:not([data-theme="light"]) .hero-content p{
    font-size: 1.9rem !important;
    line-height: 1.15;
    letter-spacing: 5px;
    color: #FFFFFF !important;
    text-shadow:
      0 0 6px rgba(0,242,255,.45),
      0 0 14px rgba(0,242,255,.28);
    opacity: 1 !important;
  }
}