/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #0d3183;
    --primary-red: #c9071d;
    --light-gray: #f8f9fa;
    --dark-gray: #333;
    --medium-gray: #666;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark-gray);
    overflow-x: hidden;
}

/* Screen reader only - hidden visually but accessible to SEO and assistive tech */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header and Navigation */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.nav-logo {
    position: absolute;
    left: 20px;
    display: flex;
    align-items: center;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.nav-logo.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.nav-logo img {
    height: 45px;
    width: auto;
}

.nav-logo.visible:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 3rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark-gray);
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-red);
    transition: width 0.3s ease;
}

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

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

/* Hero Section */
.hero {
    display: flex;
    flex-direction: column;
    padding-top: 80px;
}

/* Hero Video Section (standalone) */
.hero-video {
    position: relative;
}

.hero-video-section {
    position: relative;
    height: 80vh;
    min-height: 500px;
    overflow: hidden;
}

/* Hero video layers */
.hero-video-blur-deep {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: visible;
}

.hero-video-blur-deep video {
    width: 400%;
    height: 100%;
    margin-left: -150%;
    object-fit: cover;
    filter: blur(20px) brightness(0.9);
}

.hero-video-blur-bg {
    position: absolute;
    top: 0;
    left: 15%;
    width: 70%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
}

.hero-video-blur-bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(8px) brightness(0.85);
    transform: scale(1.3) scaleX(2);
}

.hero-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 49, 131, 0.3);
    z-index: 2;
}

.hero-video-portrait {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 100%;
    aspect-ratio: 9 / 16;
    z-index: 3;
    overflow: hidden;
}

.hero-video-portrait video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 60px 40px;
    text-align: center;
}

.hero-logo {
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease-out;
}

.hero-logo img {
    width: auto;
    max-width: 90vw;
    max-height: 60vh;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(13, 49, 131, 0.15));
}

.hero-location {
    font-size: 1.25rem;
    color: var(--medium-gray);
    margin-bottom: 3rem;
    font-weight: 400;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.cta-button {
    display: inline-block;
    background: var(--primary-blue);
    color: var(--white);
    padding: 1rem 2.5rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(13, 49, 131, 0.2);
}

.cta-button:hover {
    background: #0a2563;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 49, 131, 0.3);
}

.cta-button-secondary {
    display: inline-block;
    background: var(--white);
    color: var(--primary-blue);
    padding: 1rem 2.5rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-blue);
}

.cta-button-secondary:hover {
    background: var(--primary-blue);
    color: var(--white);
    transform: translateY(-2px);
}

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

/* Services Section */
.services {
    padding: 100px 20px;
    background: var(--light-gray);
    position: relative;
    overflow: hidden;
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(13, 49, 131, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(201, 7, 29, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.services h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 3rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary-blue);
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    position: relative;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-left-color: var(--primary-red);
}

.service-card:hover .service-icon {
    transform: scale(1.1);
    color: var(--primary-red);
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-blue);
    margin-bottom: 1.25rem;
    display: block;
    transition: all 0.3s ease;
    line-height: 1;
}

.service-icon i {
    transition: all 0.3s ease;
}

.service-card h3 {
    color: var(--primary-blue);
    font-size: 1.375rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.service-card p {
    color: var(--medium-gray);
    line-height: 1.7;
    font-size: 1rem;
}

/* About Section */
.about {
    padding: 100px 20px;
    background: var(--white);
}

.about h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 3rem;
}

.about-content {
    max-width: 1000px;
    margin: 0 auto;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: start;
}

.about-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-hover);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.about-image:hover img {
    transform: scale(1.02);
}

.about-text p {
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--medium-gray);
}

/* Ordinacija Section */
.ordinacija {
    padding: 100px 20px;
    background: var(--light-gray);
}

.ordinacija h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 3rem;
}

.ordinacija-gallery {
    padding: 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
    aspect-ratio: 4 / 3;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

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

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    z-index: 2001;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2001;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Contact Section */
.contact {
    padding: 100px 20px;
    background: var(--light-gray);
}

.contact h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 3rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item h3 {
    color: var(--primary-blue);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.contact-item p {
    color: var(--medium-gray);
    line-height: 1.7;
}

.contact-item a {
    color: var(--primary-red);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--primary-blue);
}

/* Appointment Info */
.appointment-info {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.appointment-info h3 {
    color: var(--primary-blue);
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.appointment-text {
    color: var(--medium-gray);
    line-height: 1.8;
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

.appointment-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-action-button {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: var(--primary-blue);
    color: var(--white);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.125rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(13, 49, 131, 0.2);
}

.contact-action-button:hover {
    background: #0a2563;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(13, 49, 131, 0.3);
}

.action-icon {
    font-size: 1.5rem;
}

.contact-action-button:nth-child(2) {
    background: var(--primary-red);
}

.contact-action-button:nth-child(2):hover {
    background: #a5050f;
}

/* Map Section */
.map-container {
    margin-top: 4rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.map-link {
    display: block;
    position: relative;
    cursor: pointer;
}

.map-link iframe {
    display: block;
    pointer-events: none;
}

.map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(13, 49, 131, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.map-overlay-text {
    background: var(--primary-blue);
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.125rem;
    box-shadow: 0 4px 15px rgba(13, 49, 131, 0.3);
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.map-link:hover .map-overlay {
    background: rgba(13, 49, 131, 0.15);
    opacity: 1;
}

.map-link:hover .map-overlay-text {
    transform: translateY(0);
}

/* Footer */
footer {
    background: var(--primary-blue);
    color: var(--white);
    padding: 3rem 20px 2rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-logo img {
    height: 80px;
    width: auto;
    filter: brightness(0) invert(1);
}

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

.footer-text p {
    opacity: 0.9;
    font-size: 0.95rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        gap: 2rem;
    }

    .nav-logo img {
        height: 38px;
    }

    .nav-links {
        gap: 2rem;
    }

    .nav-links a {
        font-size: 0.9rem;
    }

    .hero-video-section {
        height: 80vh;
        min-height: 450px;
    }


    .services h2,
    .about h2,
    .contact h2,
    .ordinacija h2 {
        font-size: 2rem;
    }

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

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .services,
    .about,
    .contact,
    .ordinacija {
        padding: 60px 20px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-image {
        max-width: 400px;
        margin: 0 auto;
    }

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

    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .lightbox-prev {
        left: 10px;
    }

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

@media (max-width: 480px) {
    .nav-container {
        flex-direction: column;
        padding: 0.75rem 10px;
        gap: 0.5rem;
    }

    .nav-logo {
        position: static;
        transform: translateY(0) !important;
        display: none;
    }

    .nav-logo.visible {
        display: flex;
    }

    .nav-logo img {
        height: 35px;
    }

    .nav-links {
        gap: 1rem;
        justify-content: center;
    }

    .nav-links a {
        font-size: 0.8rem;
    }

    .hero {
        padding-top: 100px;
    }

    .hero-video-section {
        height: 75vh;
        min-height: 400px;
    }

    .appointment-info {
        padding: 1.5rem;
    }

    .contact-action-button {
        font-size: 1rem;
        padding: 1rem 1.25rem;
    }

    .map-container {
        margin-top: 3rem;
    }

    .map-link iframe {
        height: 300px;
    }

    .map-overlay-text {
        font-size: 1rem;
        padding: 0.875rem 1.5rem;
    }

    .ordinacija h2 {
        font-size: 1.75rem;
    }

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

    .lightbox-close {
        top: 10px;
        right: 15px;
        font-size: 2.5rem;
    }
}
