/* ==========================================================================
   STYLE.CSS — Shared styles for Casovi Matematike Novi Sad
   ========================================================================== */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&family=Playfair+Display:wght@700&display=swap');

/* ---------- Design Tokens ---------- */
:root {
    --bg-primary: #F7F5F0;
    --bg-alt: #EDEBE6;
    --text-primary: #2C2C2C;
    --text-secondary: #8B6F4E;
    --accent: #7A2D2D;
    --accent-hover: #5C1E1E;
    --white: #FFFFFF;
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.10);
    --radius: 12px;
    --radius-sm: 8px;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --container: 1200px;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
}

/* ---------- Utility ---------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    color: var(--text-secondary);
    text-align: center;
    letter-spacing: 0.08em;
    margin-bottom: 48px;
}

/* ---------- Buttons ---------- */
.btn-primary {
    display: inline-block;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    color: var(--white);
    background-color: var(--accent);
    border: none;
    border-radius: var(--radius-sm);
    padding: 16px 40px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background-color: var(--accent-hover);
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(122, 45, 45, 0.3);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    color: var(--accent);
    background: transparent;
    border: 2px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 12px 24px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
    text-decoration: none;
}

.btn-outline:hover,
.btn-outline:focus-visible {
    background-color: var(--accent);
    color: var(--white);
    transform: scale(1.02);
}

.btn-outline:hover svg,
.btn-outline:focus-visible svg {
    fill: var(--white);
    stroke: var(--white);
}

.btn-outline svg {
    width: 20px;
    height: 20px;
    fill: var(--accent);
    stroke: var(--accent);
    transition: fill 0.3s ease, stroke 0.3s ease;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Transparent on index hero */
.site-header--transparent {
    background-color: transparent;
}

/* Always white on blog */
.site-header--white,
.site-header--scrolled {
    background-color: var(--white);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

/* Brand */
.header-brand {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
    z-index: 1001;
}

.site-header--scrolled .header-brand,
.site-header--white .header-brand {
    color: var(--text-primary);
}

/* Desktop Nav */
.header-nav {
    display: none;
    align-items: center;
    gap: 28px;
}

.header-nav a {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.3s ease;
    letter-spacing: 0.02em;
}

.site-header--scrolled .header-nav a,
.site-header--white .header-nav a {
    color: var(--text-primary);
}

.header-nav a:hover {
    color: var(--accent);
}

.header-nav a.active {
    color: var(--accent);
}

/* Desktop CTA in header */
.header-cta {
    display: none;
    font-size: 0.85rem;
    padding: 10px 24px;
}

/* Mobile phone icon */
.header-phone-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.header-phone-mobile svg {
    width: 22px;
    height: 22px;
    stroke: var(--white);
    fill: none;
    transition: stroke 0.3s ease;
}

.site-header--scrolled .header-phone-mobile svg,
.site-header--white .header-phone-mobile svg {
    stroke: var(--accent);
}

/* Hamburger */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--white);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
}

.site-header--scrolled .hamburger span,
.site-header--white .hamburger span {
    background-color: var(--text-primary);
}

/* Hamburger active state (X) */
.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
    background-color: var(--white);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
    background-color: var(--white);
}

/* Mobile Nav Overlay */
.mobile-nav {
    position: fixed;
    inset: 0;
    background-color: rgba(44, 44, 44, 0.97);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-nav.open {
    opacity: 1;
    visibility: visible;
}

.mobile-nav a {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
}

.mobile-nav a:hover {
    color: var(--text-secondary);
}

/* Desktop breakpoint */
@media (min-width: 768px) {
    .hamburger {
        display: none;
    }

    .mobile-nav {
        display: none !important;
    }

    .header-phone-mobile {
        display: none;
    }

    .header-nav {
        display: flex;
    }

    .header-cta {
        display: inline-block;
    }
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    /* REPLACE GRADIENT WITH HERO IMAGE: use background-image with object-fit cover */
    background: linear-gradient(135deg, #2C2C2C 0%, #3D2E1E 40%, #8B6F4E 100%);
    overflow: hidden;
}

/* Background video */
.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 0;
    display: none;
    }
    
    @media (min-width: 768px) {
        .hero-video {
            display: block;
        }
    }
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 0 20px;
    max-width: 800px;
}

.hero-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 4.4rem);
    color: var(--white);
    margin-bottom: 16px;
    line-height: 1.15;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 2vw, 1.33rem);
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 40px;
    line-height: 1.5;
}

.hero .btn-primary {
    font-size: 1.05rem;
}

/* Scroll-down chevron */
.scroll-chevron {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: bounce 2s ease infinite;
}

.scroll-chevron svg {
    width: 32px;
    height: 32px;
    stroke: rgba(255, 255, 255, 0.6);
    fill: none;
    stroke-width: 2;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ==========================================================================
   SECTIONS — shared patterns
   ========================================================================== */
.section {
    padding: 48px 0;
}

.section--alt {
    background-color: var(--bg-alt);
}

.section--primary {
    background-color: var(--bg-primary);
}

@media (min-width: 768px) {
    .section {
        padding: 80px 0;
    }
}

@media (min-width: 1024px) {
    .section {
        padding: 100px 0;
    }
}

/* ==========================================================================
   USLUGE (Services) — Card Grid
   ========================================================================== */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
}

.service-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 32px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.service-card h3 {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.service-card p {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 0.95rem;
    color: #6B6B6B;
    line-height: 1.5;
}

/* ==========================================================================
   O NAMA (About Us)
   ========================================================================== */
.about-philosophy {
    max-width: 700px;
    margin: 0 auto 64px;
    text-align: center;
}

.about-philosophy h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.about-philosophy p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: 16px;
}

@media (min-width: 768px) {
    .about-philosophy p {
        font-size: 1.15rem;
    }
}

/* Tutor cards */
.tutor-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 64px;
}

@media (min-width: 768px) {
    .tutor-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.tutor-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 32px;
    text-align: center;
}

@media (min-width: 768px) {
    .tutor-card {
        padding: 40px;
    }
}

.tutor-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background-color: #D9D5CE;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: #8B8B8B;
    overflow: hidden;
}

.tutor-card h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

/* GPA Badge */
.gpa-badge {
    display: inline-block;
    background-color: var(--accent);
    color: var(--white);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.8rem;
    border-radius: 20px;
    padding: 4px 16px;
    margin-bottom: 12px;
}

.tutor-card .tutor-title {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.tutor-card .tutor-bio {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 16px;
    text-align: left;
}

.tutor-card .tutor-details {
    font-size: 0.9rem;
    line-height: 1.7;
    color: #6B6B6B;
    text-align: left;
    margin-bottom: 20px;
}

.tutor-card .tutor-details strong {
    color: var(--text-primary);
}

/* Academic proof placeholder */
.academic-proof {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #D9D5CE;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #8B8B8B;
    margin-top: 16px;
}

/* Testimonials */
.testimonials {
    max-width: 900px;
    margin: 0 auto;
}

.testimonials h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 32px;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 768px) {
    .testimonial-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.testimonial-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 32px;
    position: relative;
}

.testimonial-card::before {
    content: '\201C';
    position: absolute;
    top: 16px;
    left: 24px;
    font-family: var(--font-heading);
    font-size: 4rem;
    line-height: 1;
    color: rgba(139, 111, 78, 0.15);
}

.testimonial-card blockquote {
    font-family: var(--font-body);
    font-weight: 400;
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #555;
    margin-bottom: 16px;
    padding-top: 24px;
}

.testimonial-card cite {
    font-style: normal;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* ==========================================================================
   CENOVNIK (Pricing)
   ========================================================================== */
.pricing-table {
    max-width: 500px;
    margin: 0 auto;
}

.pricing-group {
    margin-bottom: 40px;
}

.pricing-group h3 {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--text-secondary);
}

.pricing-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 1rem;
}

.pricing-row:last-child {
    border-bottom: none;
}

.pricing-row .duration {
    color: var(--text-primary);
}

.pricing-row .price {
    font-weight: 600;
    color: var(--text-primary);
}

.pricing-cta {
    text-align: center;
    margin-top: 40px;
}

/* ==========================================================================
   BLOG PREVIEW (Matematicki kutak)
   ========================================================================== */
.blog-intro {
    text-align: center;
    font-size: 1rem;
    color: #6B6B6B;
    margin-bottom: 40px;
    margin-top: -24px;
}

.blog-preview-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .blog-preview-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.blog-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 32px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.blog-card h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.blog-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #6B6B6B;
    margin-bottom: 16px;
}

.blog-card .read-more {
    font-weight: 600;
    color: var(--accent);
    transition: color 0.3s ease;
}

.blog-card .read-more:hover {
    color: var(--accent-hover);
}

/* ==========================================================================
   KONTAKT (Contact)
   ========================================================================== */
.contact-inner {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-inner>p {
    font-size: 1.05rem;
    color: #6B6B6B;
    margin-bottom: 16px;
}

.contact-phone {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--accent);
    margin-bottom: 32px;
    display: block;
    text-decoration: none;
}

.contact-phone:hover {
    color: var(--accent-hover);
}

.contact-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    margin-bottom: 32px;
}

@media (min-width: 768px) {
    .contact-buttons {
        flex-direction: row;
        justify-content: center;
        gap: 16px;
    }
}

.contact-social {
    margin-bottom: 16px;
}

.contact-social a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.contact-social a:hover {
    color: var(--accent-hover);
}

.contact-social svg {
    width: 20px;
    height: 20px;
}

.contact-muted {
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 8px;
}

.contact-location {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
    color: #6B6B6B;
}

.contact-location svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #6B6B6B;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    background-color: var(--text-primary);
    padding: 48px 0 32px;
    text-align: center;
    color: var(--bg-primary);
}

.footer-quote {
    font-style: italic;
    font-size: 0.95rem;
    color: rgba(247, 245, 240, 0.7);
    margin-bottom: 24px;
    line-height: 1.5;
}

.site-footer hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin: 0 auto 24px;
    max-width: 300px;
}

.footer-copy {
    font-size: 0.85rem;
    color: rgba(247, 245, 240, 0.55);
    margin-bottom: 16px;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(247, 245, 240, 0.55);
    transition: color 0.3s ease;
}

.footer-social a:hover {
    color: var(--bg-primary);
}

.footer-social svg {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   BLOG PAGE
   ========================================================================== */
.blog-page-header {
    padding-top: 100px;
    padding-bottom: 16px;
    text-align: center;
}

.blog-page-header h1 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: var(--text-primary);
    margin-bottom: 12px;
}

.blog-page-header p {
    font-size: 1.05rem;
    color: #6B6B6B;
}

/* Article */
.article-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

.article-container h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--text-primary);
    margin-bottom: 24px;
}

.article-container h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-top: 40px;
    margin-bottom: 16px;
}

.article-container p {
    font-size: 1.08rem;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: 20px;
}

/* SVG illustration for blog */
.triangle-illustration {
    display: flex;
    justify-content: center;
    margin: 40px 0;
}

.triangle-illustration svg {
    max-width: 100%;
    height: auto;
}

.article-cta {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.article-cta a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.3s ease;
}

.article-cta a:hover {
    color: var(--accent-hover);
}

.back-link {
    display: block;
    text-align: center;
    margin: 0 auto 48px;
    font-weight: 600;
    color: var(--accent);
    font-size: 1rem;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--accent-hover);
}

/* ==========================================================================
   SECTION LETTER-SPACING OVERRIDE — Cenovnik
   ========================================================================== */
.section-title--wide {
    letter-spacing: 0.15em;
}