/* Root variables - iste kao u styles.css i styles2.css */
:root {
    --primary-text: #333333;
    --accent: #E07A5F;
    --background: #FFFFFF;
    --dark-background: #333333;
    --font-family: 'Inter', sans-serif;
}

/* Body styles - iste */
body {
    margin: 0;
    font-family: var(--font-family);
    background: var(--background);
    color: var(--primary-text);
    line-height: 1.6;
    font-weight: 400;
    background: linear-gradient(
        to bottom,
        rgba(231, 220, 201, 0.8) 20%,
        white 100%
    );
}

/* Container - isti */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header styles - kopirano, nepromijenjeno */
.sticky-header {
    position: sticky;
    top: 0;
    background: var(--background);
    box-shadow: 0 1px 0 #000;
    padding: 1rem 0;
    z-index: 1000;
}

.sticky-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.header-left,
.header-center,
.header-right {
    display: flex;
    align-items: center;
}

.header-center {
    flex: 1;
    justify-content: center;
}

.header-right {
    gap: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    font-weight: bold;
}

.accent-text {
    color: var(--accent);
}

.desktop-nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

.desktop-nav a {
    color: var(--primary-text);
    text-decoration: none;
    font-weight: 400;
    font-weight: bold;
}

.cta-button.small {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-radius: 20px;
}

.hamburger {
    display: none;
    cursor: pointer;
    font-size: 2rem;
    color: #000;
}

.mobile-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--background);
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 0 0 10px 10px;
}

.mobile-nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 0;
}

.mobile-nav a {
    color: black;
    text-decoration: none;
    font-size: 1.2rem;
    display: block;
    padding: 0.5rem 0;
}

/* Hero section - prilagođeno za services */
.hero.section {
    position: relative;
    padding: 6rem 0;
    text-align: center;
    background: url('assets/background-hero.jpg') no-repeat center center/cover;
    color: #fff;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
    max-width: 80%;
    color: #fff;
}

.hero .subheadline {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 auto 2rem;
    max-width: 80%;
}

/* General section styles */
.section {
    padding: 4rem 0;
}

.gray-background {
    background-color: #f9f7f3;
}

/* Badge, h2, subheadline - centrirano */
.badge,
h2,
.subheadline {
    text-align: center;
}

.badge {
    background: rgba(224, 122, 95, 0.1);
    color: var(--accent);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: fit-content;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.subheadline {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Services grid - za 3-3-2 layout */
.services-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Centriraj kartice u svakom redu, uključujući zadnji sa 2 kartice */
    gap: 2rem;
}

.services-grid .service-card:nth-child(n+7) {
    grid-column: 2 / 3;  /* Centriraj 7. karticu */
}

.services-grid .service-card:nth-child(8) {
    grid-column: 3 / 4;  /* 8. kartica desno od centrirane */
}

/* Service card styles iz indexa */
.service-card {
    background: #fff;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    position: relative;
    flex-basis: 300px; /* Fiksna baza širine za 3 po redu (npr. na 1200px containeru: 3*300 + 2*20 = 940px, centrira se) */
    min-width: 300px; /* Minimalna širina */
    flex-grow: 0; /* Ne raste */
    flex-shrink: 0; /* Ne smanjuje se */
}

.popular-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: var(--accent);
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.service-card svg {
    margin-bottom: 1rem;
}

.service-card h3 {
    margin-bottom: 0.5rem;
}

.service-card p {
    color: #666;
    margin-bottom: 1rem;
}

.service-card ul {
    list-style: none;
    padding: 0;
    color: #666;
    margin-bottom: 1rem;
}

.service-card li:before {
    content: '✓';
    color: var(--accent);
    margin-right: 0.5rem;
}

.price {
    color: var(--accent);
    font-weight: 600;
    display: block;
    margin: 1rem 0;
}

.outline-button {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 0.5rem 1rem;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
    width: 100%;
}

.outline-button:hover {
    background: rgba(224, 122, 95, 0.1);
}

/* CTA card na kraju sekcije */
.cta-card {
    text-align: center;
    margin-top: 2rem;
}

.cta-card .cta-button {
    width: auto;
    padding: 1rem 2rem;
}

/* Calculator section - kopirano */
.calculator-card {
    background: #fff;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
}

.calculator-card h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    text-align: left;
}

.calculator-card p {
    font-size: 1rem;
    color: #666;
    margin-bottom: 2rem;
}

.tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab {
    background: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #666;
}

.tab:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.tab.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.slider-row {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.slider-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.slider-group label {
    flex: 1;
    font-size: 1rem;
    color: #333;
    white-space: nowrap;
}

.slider-group input[type="range"] {
    flex: 2;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #ddd;
    border-radius: 5px;
    outline: none;
    transition: background 0.3s ease;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.slider-group input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.slider-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.slider-group span {
    min-width: 60px;
    text-align: right;
    color: #666;
    font-size: 1rem;
}

.price-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 2rem 0;
}

.price-item {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    color: #333;
}

.price-item span:last-child {
    font-weight: 600;
    color: #333;
}

.price-item.total {
    font-weight: 700;
    color: var(--accent);
    border-top: 1px solid #ddd;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
}

.price-item.total span:last-child {
    color: var(--accent);
}

.cta-button {
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cta-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(224, 122, 95, 0.3);
}

.note {
    font-size: 0.8rem;
    color: #666;
    text-align: left;
}

/* CTA section */
.cta-section {
    padding: 4rem 0;
}

.cta-card {
    background: #fff;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.cta-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.cta-card .subheadline {
    margin-bottom: 1.5rem;
}

.cta-card .cta-button {
    width: auto;
    display: inline-block;
}

.contact-info {
    font-weight: bold;
    color: var(--accent);
    margin-top: 1rem;
}

/* Animacije */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-left {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-right {
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.visible {
    opacity: 1;
    transform: translateY(0) translateX(0);
}

/* Footer - kopirano */
footer {
    background: var(--dark-background);
    color: #fff;
    padding: 3rem 0 1.5rem;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-column {
    display: flex;
    flex-direction: column;
}

.footer-logo .logo {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #fff;
}

.footer-logo p {
    color: #bbb;
    line-height: 1.5;
    font-size: 0.85rem;
    max-width: 250px;
}

.footer-column h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column li {
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.footer-column a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
}

.footer-column a:hover {
    color: var(--accent);
    transform: translateX(3px);
}

.footer-contact p {
    color: #ddd;
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
}

.footer-contact .social {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.footer-contact .social a {
    color: #fff;
    transition: color 0.3s ease, transform 0.3s ease;
}

.footer-contact .social a:hover {
    color: var(--accent);
    transform: scale(1.1);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #aaa;
}

.copyright {
    margin: 0;
}

.legal-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.legal-links a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s ease;
}

.legal-links a:hover {
    color: var(--accent);
}

/* Spojeni media queries za bolju organizaciju */

/* Za ekrane do 1024px (tablet/large mobile) */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-logo {
        grid-column: span 3;
        text-align: center;
    }

    .footer-logo p {
        max-width: none;
        margin: 0 auto;
    }

    .footer-column {
        text-align: center;
    }

    .footer-contact .social {
        justify-content: center;
    }

    .service-card {
        flex-basis: 45%; /* Otprilike 2 po redu */
        min-width: 300px;
    }
}

/* Za ekrane do 640px (mobilni uređaji) */
@media (max-width: 640px) {
    /* Header */
    .desktop-nav {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .cta-button.small {
        display: none;
    }

    .header-center {
        display: none;
    }

    .sticky-header .container {
        justify-content: space-between;
    }

    /* Hero */
    .hero h1 {
        font-size: 2rem;
    }

    .hero .subheadline {
        font-size: 1rem;
    }

    /* Services grid */
    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        flex-basis: 80%; 
        max-width: 80%; 
        min-width: auto; 
        margin: 0 auto; 
    }

    /* Slider row (calculator) */
    .slider-row {
        gap: 1rem;
    }

    /* Footer */
    .footer-grid {
        display: flex;
        flex-direction: column;
        gap: 1rem; /* Smanji razmak između sekcija */
    }

    .footer-column {
        width: 100%;
        text-align: center; 
        margin-bottom: 1rem; 
    }

    .footer-column h4 {
        font-size: 1.2rem; /* Malo veći naslov za čitljivost */
        margin-bottom: 0.5rem;
    }

    .footer-column ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .footer-column ul li {
        margin-bottom: 0.3rem; 
        font-size: 0.9rem; 
    }

    .footer-logo p {
        font-size: 0.9rem; /* Smanji opis logo-a */
    }

    .footer-contact p {
        font-size: 0.9rem;
        margin: 0.3rem 0;
    }

    .social {
        justify-content: center;
        gap: 1rem;
        margin-top: 0.5rem;
    }

    .social a {
        display: inline-block;
    }

    .social svg {
        width: 24px; /* Standardna veličina ikona */
        height: 24px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.8rem; /* Smanji copyright i legal font */
    }

    .legal-links {
        flex-direction: column;
        gap: 0.3rem;
        align-items: center;
        margin: 0;
        padding: 0;
    }

    .legal-links li {
        margin: 0;
    }

    .legal-links a {
        text-decoration: none;
        color: #aaa; /* Ako treba promijeniti boju */
    }
}

/* Media queries za calculator (spoeno i ostavljeno posebno jer je specifično) */

/* Za ekrane do 600px (iPhone, mali mobiteli) */
@media (max-width: 600px) {
    .calculator-card {
        padding: 1.5rem; /* Manji padding da se stane na ekran */
        max-width: 100%; /* Puni width na mobitelu */
        border-radius: 15px; /* Malo manji radius za bolji fit */
    }

    .calculator-card h2 {
        font-size: 1.5rem; /* Manji naslov */
    }

    .calculator-card p {
        font-size: 0.9rem; /* Manji tekst */
    }

    .tabs {
        flex-wrap: wrap; /* Tabovi u više redova ako ne stanu */
        gap: 0.5rem; /* Manji gap */
        justify-content: center; /* Centriraj tabove */
    }

    .tab {
        padding: 0.5rem 1rem; /* Manji tabovi */
        font-size: 0.9rem; /* Manji font */
        flex: 1 1 45%; /* Dva po redu, wrap na jedan ako treba */
        text-align: center;
    }

    .slider-row {
        gap: 1rem; /* Manji razmak između slidera */
    }

    .slider-group {
        flex-direction: column; /* Stackaj vertikalno: label gore, slider dolje, value dolje */
        align-items: flex-start; /* Lijevo poravnato */
        gap: 0.5rem; /* Manji gap */
    }

    .slider-group label {
        width: 100%; /* Puni width labela */
        font-size: 0.9rem;
    }

    .slider-group input[type="range"] {
        width: 100%; /* Slider puni width */
        flex: none; /* Ukloni flex za fiksni width */
    }

    .slider-group span {
        width: 100%; /* Value puni width, ispod slidera */
        text-align: left; /* Lijevo poravnato */
        font-size: 0.9rem;
    }

    .slider-group select {
        width: 100%; /* Select puni width za Prodaja */
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    .price-breakdown {
        gap: 0.5rem; /* Manji gap */
    }

    .price-item {
        flex-direction: column; /* Stackaj cijene vertikalno ako je preširoko */
        align-items: flex-start;
        font-size: 0.9rem;
    }

    .price-item span:last-child {
        margin-top: 0.25rem; /* Malo razmaka između labela i cijene */
    }

    .price-item.total {
        font-size: 1rem;
    }

    .cta-button,
    .outline-button {
        padding: 0.75rem; /* Manji buttoni */
        font-size: 0.9rem;
    }

    .note {
        font-size: 0.75rem; /* Manji note */
    }
}

/* Za tablet (600px - 768px), opcionalno ako treba finiji tuning */
@media (min-width: 601px) and (max-width: 768px) {
    .calculator-card {
        padding: 1.8rem;
        max-width: 90%; /* Malo suže na tabletima */
    }

    .tabs {
        gap: 0.75rem;
    }

    .tab {
        padding: 0.6rem 1.2rem;
        font-size: 0.95rem;
    }

    .slider-group {
        flex-direction: row; /* Ostavi horizontalno na tabletima */
    }

    .slider-group input[type="range"] {
        flex: 2;
    }

    .price-item {
        flex-direction: row; /* Horizontalno na tabletima */
    }
}

/* Dodatak za input-wrapper (da slider i number budu u redu) */
.input-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem; /* Razmak između slidera i numbera */
    width: 100%; /* Puni width */
}

.slider-group input[type="number"] {
    width: 80px; /* Fiksna širina za number input */
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    text-align: right; /* Desno poravnato za brojeve */
}

/* Responsive za mobitel - number inputi se prilagođavaju */
@media (max-width: 600px) {
    .input-wrapper {
        flex-direction: column; /* Stackaj slider gore, number dolje na mobitelu */
        gap: 0.5rem;
        width: 100%;
    }

    .slider-group input[type="number"] {
        width: 100%; /* Puni width na mobitelu za lakši unos */
        text-align: left; /* Lijevo poravnato za bolju vidljivost */
    }
}