/* =========================================
   ADIP Modern CSS Framework
   Pula Observatory - Astronomsko društvo "Istra"
   Dark Theme with Glassmorphism & Animations
   ========================================= */

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

/* === CSS Variables === */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(20, 20, 35, 0.7);
    --bg-glass: rgba(255, 255, 255, 0.05);
    --border-glass: rgba(255, 255, 255, 0.1);

    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #606075;

    --accent-primary: #00d4ff;
    --accent-secondary: #7c3aed;
    --accent-gradient: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);

    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(0, 212, 255, 0.15);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 32px;

    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* === Base Reset === */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Image Layer */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../background.png') center center / cover no-repeat fixed;
    z-index: -2;
}

/* Dark Overlay Layer - default for home */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.75);
    z-index: -1;
    pointer-events: none;
}

/* Blur + Darkened for non-home pages */
body.page-blur::before {
    filter: blur(8px);
    transform: scale(1.05);
}

body.page-blur::after {
    background: rgba(10, 10, 15, 0.85);
}

/* Gradient accent overlay */
body .bg-gradient-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(0, 212, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(124, 58, 237, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* === Typography === */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 5rem);
}

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

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--text-primary);
}

/* === Glassmorphism Card === */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

/* === Header === */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0.5rem 2rem;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header__logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header__logo img {
    height: 40px;
    width: 40px;
    object-fit: cover;
    border-radius: 50%;
}

.header__title {
    font-size: 1.25rem;
    font-weight: 600;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header__subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* === Navigation === */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-glass);
    z-index: 1500;
    transform: translateX(-100%);
    transition: var(--transition-smooth);
    padding: 5rem 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    overflow-y: auto;
}

.nav.active {
    transform: translateX(0);
}

.nav__link {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav__link:hover,
.nav__link.active {
    background: var(--bg-glass);
    color: var(--text-primary);
}

.nav__link.active {
    border-left: 3px solid var(--accent-primary);
    background: rgba(0, 212, 255, 0.1);
}

/* Nav Close Button */
.nav__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-fast);
    padding: 0.5rem;
}

.nav__close:hover {
    color: var(--text-primary);
}

/* Nav Spacer - pushes login to bottom */
.nav__spacer {
    flex: 1;
}

/* Nav Login Button */
.nav__login {
    margin-top: 1rem;
    width: 100%;
}

/* Sidebar Overlay */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1400;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* === Menu Toggle (Hamburger) === */
.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
    z-index: 1100;
    position: relative;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--accent-primary);
    border-radius: 2px;
    transition: var(--transition-fast);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* === Hero Section === */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 5% 4rem;
    position: relative;
}

.hero__content {
    max-width: 1000px;
}

.hero__badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 100px;
    font-size: 1rem;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
}

.hero__title {
    margin-bottom: 1rem;
}

.hero__title span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero__location-link {
    display: inline-block;
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none;
    transition: var(--transition-fast);
    font-size: 1.1rem !important;
    margin-bottom: 2.5rem;
}

.hero__location-link:hover {
    color: var(--accent-primary) !important;
}

.hero__social {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 2rem;
}

.hero__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    transition: var(--transition-smooth);
}

.hero__social-link:hover {
    background: var(--accent-primary);
    color: #000;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
}

.hero__social-link svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: var(--transition-smooth);
}

.btn--primary {
    background: var(--accent-gradient);
    color: #000;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
}

.btn--secondary {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
}

.btn--secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* === Sections === */
.section {
    padding: 5rem 5%;
}

.section__header {
    text-align: center;
    margin-bottom: 3rem;
}

.section__title {
    margin-bottom: 0.5rem;
}

.section__subtitle {
    color: var(--text-secondary);
}

/* === Grid === */
.grid {
    display: grid;
    gap: 2rem;
}

.grid--2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid--3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid--4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* === Activity Card === */
.activity-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition-smooth);
}

.activity-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

.activity-card__date {
    font-size: 0.8rem;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.activity-card__title {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.activity-card__content {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* === Gallery Grid === */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.gallery-item {
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* === Form Elements === */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

/* === Modal === */
select,
option {
    background-color: #000000 !important;
    color: #ffffff !important;
}

/* === Modal === */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    max-width: 450px;
    width: 100%;
    transform: scale(0.9);
    transition: var(--transition-smooth);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal__header {
    text-align: center;
    margin-bottom: 2rem;
}

.modal__title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

/* === Footer === */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-glass);
    padding: 3rem 5%;
    text-align: center;
}

.footer__contact {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.8;
}

.footer__contact a {
    color: var(--accent-primary);
}

/* === Language Toggle === */
.lang-toggle {
    padding: 0.5rem 0.75rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.lang-toggle:hover {
    background: var(--accent-primary);
    color: #000;
}

/* === User Controls === */
.user-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* === Utilities === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === Page Content === */
.page-content {
    padding-top: 100px;
    min-height: 100vh;
}

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

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

.animate-in {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-delay-1 {
    animation-delay: 0.1s;
}

.animate-delay-2 {
    animation-delay: 0.2s;
}

.animate-delay-3 {
    animation-delay: 0.3s;
}

/* =========================================
   Lightbox Component
   ========================================= */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox__content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox__image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.lightbox__caption {
    margin-top: 1rem;
    color: var(--text-secondary);
    text-align: center;
    font-size: 0.95rem;
    max-width: 600px;
}

.lightbox__close {
    position: absolute;
    top: -3rem;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: var(--transition-fast);
}

.lightbox__close:hover {
    opacity: 1;
}

.lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    color: white;
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox__nav:hover {
    background: var(--accent-primary);
}

.lightbox__nav--prev {
    left: -70px;
}

.lightbox__nav--next {
    right: -70px;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Category Pills */
.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.category-pill {
    padding: 0.5rem 1.25rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.category-pill:hover,
.category-pill.active {
    background: var(--accent-primary);
    color: var(--bg-primary);
    border-color: var(--accent-primary);
}

@media (max-width: 768px) {
    .lightbox__nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .lightbox__nav--prev {
        left: 10px;
    }

    .lightbox__nav--next {
        right: 10px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

/* === Language Selector Dropdown === */
.lang-selector {
    position: relative;
    display: inline-block;
}

.lang-current {
    padding: 0.5rem 1rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-current:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-primary);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    min-width: 120px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-fast);
    z-index: 1100;
    overflow: hidden;
}

.lang-selector:hover .lang-dropdown,
.lang-selector.active .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--transition-fast);
}

.lang-option:hover {
    background: var(--bg-glass);
    color: var(--text-primary);
}

.lang-option.active {
    background: rgba(0, 212, 255, 0.1);
    color: var(--accent-primary);
}

/* Blue Visit Button Style */
.btn--blue {
    background: linear-gradient(135deg, #0066ff 0%, #0099ff 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.4);
    font-weight: 600;
    padding: 1rem 2rem;
    font-size: 1.05rem;
}

.btn--blue:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 102, 255, 0.5);
    color: #fff;
}

/* Radovi List View */
.radovi-item {
    transition: background 0.2s ease;
}

.radovi-item:hover {
    background: rgba(255, 255, 255, 0.05);
}