/* --- Global Variables & Reset --- */
:root {
    --nav-gradient-start: #23083b;  /* Deep synthwave purple-black */
    --nav-gradient-end: #490e54;    /* Rich magenta-purple twilight */
    --accent-glow: #ecc94b;          /* Golden sun yellow */
    --pink-neon: #ff2a85;            /* Hot pink sunset accent */
    --text-light: #ffffff;           /* Clean white text */
    --bg-light: #f7fafc;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', 'Segoe UI', Helvetica, Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    color: var(--nav-gradient-start);
    background-color: var(--bg-light);
    line-height: 1.6;
}

/* --- Header & Navigation --- */
header {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, var(--nav-gradient-start) 30%, var(--nav-gradient-end) 100%);
    width: 100%;
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    box-shadow: 0 4px 20px rgba(73, 14, 84, 0.4); 
    z-index: 1000;
    border-bottom: 2px solid var(--pink-neon);
}

.logo {
    display: flex;
    align-items: center;
    height: 100%;
}

.logo a {
    display: flex;
    align-items: center;
    height: 100%;
    text-decoration: none;
}

.logo img {
    max-height: 55px; 
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.04);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
}

nav ul li a:hover {
    color: var(--accent-glow);
    background: rgba(255, 255, 255, 0.08);
}

/* Language Switcher */
.language-switch {
    display: flex;
    gap: 0.5rem;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-light);
    padding: 0.4rem 0.7rem;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
    transition: all 0.3s ease;
    text-decoration: none !important;
}

.lang-btn:hover {
    background-color: var(--pink-neon);
    border-color: var(--pink-neon);
    color: var(--text-light);
    box-shadow: 0 0 12px var(--pink-neon);
}

.lang-btn.active {
    background-color: var(--accent-glow);
    border-color: var(--accent-glow);
    color: var(--nav-gradient-start);
    box-shadow: 0 0 12px var(--accent-glow);
}

/* --- Hero Section --- */
.hero {
    position: relative;
    width: 100%;
    min-height: calc(100vh - 80px);
    background: url(flota.png) center/cover no-repeat;
    display: flex;
    align-items: center;
    padding: 0 5%;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-container {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 2rem;
}

.hero-content {
    flex: 1;
    color: var(--text-light);
    max-width: 600px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
}

/* Forms Layout */
.hero-form-wrapper, .secondary-form-wrapper {
    flex: 0 0 400px;
}


/* --- Hero Actions (Buttons) --- */
.hero-actions {
    display: flex;
    gap: 1.5rem;
    margin-top: 2.5rem;
    flex-wrap: nowrap; /* Ensures they stay in a single row */
    max-width: 420px;
}

.hero-action-btn {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    align-items: center;
    text-decoration: none;
    color: var(--text-light);
    gap: 0.5rem;
    transition: transform 0.3s ease;
}

.hero-action-btn:hover {
    transform: translateY(-5px);
}

.hero-action-btn .icon-circle {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

/* Specific button hover colors for an interactive feel */
.whatsapp-btn:hover .icon-circle {
    background: #25D366;
    border-color: #25D366;
    box-shadow: 0 0 15px rgba(37, 211, 102, 0.6);
}

.call-btn:hover .icon-circle {
    background: #34b7f1;
    border-color: #34b7f1;
    box-shadow: 0 0 15px rgba(52, 183, 241, 0.6);
}

.email-btn:hover .icon-circle {
    background: var(--pink-neon);
    border-color: var(--pink-neon);
    box-shadow: 0 0 15px rgba(255, 42, 133, 0.6);
}

.book-btn:hover .icon-circle {
    background: var(--accent-glow);
    border-color: var(--accent-glow);
    color: var(--nav-gradient-start);
    box-shadow: 0 0 15px rgba(236, 201, 75, 0.6);
}

.hero-action-btn .btn-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}


.booking-form {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(5px);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.booking-form h3 {
    color: var(--nav-gradient-start);
    margin-bottom: 0.5rem;
    text-align: center;
}

.booking-form input, .booking-form select, .booking-form textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
}

.btn-submit {
    background-color: var(--accent-glow);
    color: var(--nav-gradient-start);
    border: none;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-submit:hover {
    background-color: #d4b13a;
}

/* --- Services Section --- */
/* --- Services Section --- */
.services {
    padding: 5rem 5%;
    text-align: center;
    background: var(--text-light);
}

.services h2 {
    font-size: 2.5rem;
    color: var(--nav-gradient-start);
    margin-bottom: 3rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    
    /* Using flex direction column pushes the image nicely to the bottom if text lengths vary */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(73, 14, 84, 0.15);
}

.card h3 {
    color: var(--nav-gradient-start);
    margin-bottom: 1rem;
}

.card p {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    flex-grow: 1; /* Pushes everything below it down */
}

/* Service Image Cards Engine */
.card-img {
    width: 100%;
    height: 160px;
    object-fit: cover; /* Keeps image from warping or squishing */
    border-radius: 6px;
    margin-top: auto;
    transition: transform 0.3s ease;
}


/* --- About & Booking Section --- */
.about-book-section {
    display: flex;
    justify-content: space-between;
    align-items: stretch; /* Forces left column height to equal the right column form height */
    padding: 5rem 5%;
    gap: 4rem;
    background: var(--bg-light);
}

.about-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Head goes to absolute top, image goes to absolute bottom */
}

.about-text-group {
    /* Keeps text elements snug together at the top */
    display: flex;
    flex-direction: column;
}

.about-content h1 {
    font-size: 2.5rem;
    color: var(--nav-gradient-start);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.about-content p {
    margin-bottom: 2rem;
    font-size: 1rem;
    color: var(--nav-gradient-start);
}

/* 16:9 Native High Resolution Image Controller */
.about-image-wrapper {
    width: 85%;              /* Scales the image down slightly so it isn't overwhelming */
    margin-top: auto;        /* Keeps it anchored to the bottom alignment line of the form */
    margin-left: auto;       /* Centers it beautifully within the column, away from the container edges */
    margin-right: auto;
}

.about-custom-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    /* Keeps image sharp, wide, and readable without clipping any custom copies */
}

.detailed-form {
    background: var(--text-light);
    backdrop-filter: none;
}

/* --- Definitive Footer System --- */
footer {
    background: linear-gradient(135deg, var(--nav-gradient-start) 0%, var(--nav-gradient-end) 70%);
    color: var(--text-light);
    padding: 3.5rem 5% 2rem 5%;
    border-top: 2px solid var(--pink-neon);
    box-shadow: 0 -4px 20px rgba(73, 14, 84, 0.2);
}

/* Horizontal flex setup to keep items side by side on desktop */
.footer-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end; /* Locks Privacy Policy directly to the bottom horizon line */
    margin-bottom: 2.5rem;
}

/* Social links list column */
.footer-social {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-social a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.2rem 0;
}

.footer-social a:hover {
    color: var(--accent-glow);
    text-shadow: 0 0 8px rgba(236, 201, 75, 0.6);
}

.footer-social a:hover .fa-whatsapp {
    color: #25D366;
}

/* Privacy Links column styling */
.footer-links {
    font-size: 0.95rem;
    text-align: right;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--pink-neon);
    text-shadow: 0 0 8px rgba(255, 42, 133, 0.6);
}

/* Separate full-width Copyright Row */
.footer-copy {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
}

.footer-copy p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

/* --- Impresum & Legal Pages Layout --- */
.legal-page-container {
    padding: 4rem 5%;
    background-color: var(--bg-light);
    min-height: calc(100vh - 160px);
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
}

.legal-card {
    background: var(--text-light);
    max-width: 900px;
    width: 100%;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(73, 14, 84, 0.08);
    border: 1px solid rgba(73, 14, 84, 0.05);
    box-sizing: border-box;
    overflow: hidden; /* Sprečava bilo kakvo bježanje sadržaja */
}

.legal-card h1 {
    color: var(--nav-gradient-start);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    border-bottom: 3px solid var(--pink-neon);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.legal-intro {
    font-size: 1rem;
    color: #555;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.legal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.legal-section {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--nav-gradient-end);
    box-sizing: border-box;
}

.legal-section.full-width {
    grid-column: span 2;
}

.legal-section h3 {
    color: var(--nav-gradient-start);
    margin-bottom: 1rem;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.legal-section h3 i {
    color: var(--pink-neon);
}

/* Tablice na desktopu */
.legal-section table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* Prisiljava tablicu da poštuje širinu roditelja */
}

.legal-section table td {
    padding: 0.5rem 0;
    vertical-align: top;
    font-size: 0.95rem;
    word-wrap: break-word; /* Prelama dugačke linkove i mailove */
    overflow-wrap: break-word;
}

.legal-section table td:first-child {
    width: 35%;
    color: #666;
}

.legal-link {
    color: var(--nav-gradient-end);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    word-break: break-all; /* Sigurnost za izrazito dugačke linkove */
}

.legal-link:hover {
    color: var(--pink-neon);
}

.mt-1 {
    margin-top: 1rem;
}

.legal-actions {
    margin-top: 3rem;
    text-align: center;
}

.legal-actions .btn-submit {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0.8rem 2rem;
}

/* --- Sticky WhatsApp Button --- */
/* Hidden by default on desktop */
.whatsapp-sticky {
    display: none;
}

/* --- RESPONSIVE FIX ZA MOBITELE --- */
@media (max-width: 768px) {
    .legal-page-container {
        padding: 2rem 3%; /* Manji padding na rubovima ekrana */
    }

    .legal-card {
        padding: 1.5rem;
    }
    
    .legal-card h1 {
        font-size: 1.8rem;
    }
    
    .legal-grid {
        grid-template-columns: 1fr; /* Sve ide u jedan stupac */
        gap: 1.2rem;
    }
    
    .legal-section.full-width {
        grid-column: span 1;
    }

    /* Potpuno razbijanje tablične strukture na mobitelu */
    .legal-section table, 
    .legal-section tbody, 
    .legal-section tr, 
    .legal-section td {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box;
    }
    
    .legal-section tr {
        margin-bottom: 1rem; /* Razmak između dva podatka (npr. između naziva i adrese) */
    }

    .legal-section tr:last-child {
        margin-bottom: 0;
    }
    
    .legal-section table td {
        padding: 0 !important;
    }
    
    .legal-section table td:first-child {
        font-size: 0.85rem;
        color: #888;
        margin-bottom: 0.2rem; /* Naslov podatka ide iznad same vrijednosti */
        font-weight: bold;
    }

    .legal-section table td:last-child {
        font-size: 0.95rem;
        color: var(--nav-gradient-start);
        line-height: 1.4;
        word-break: break-word; /* Prelama dugačke nazive obrta i adrese */
    }
}

/* --- Responsive Adjustments --- */
@media (max-width: 968px) {
    /* 1. FIX NAVBAR OVERFLOW & WIDTH MISMAtCH */
    header {
        max-width: 100vw;
        overflow: hidden; /* Clamps the wide language container internally */
        /* Increased right padding slightly and added a gap */
        padding: 0 6% 0 4%; 
        gap: 1rem; /* Forces a mandatory minimum space between logo and buttons */
    }
    
    .logo {
        flex: 1 1 auto; /* Allows the logo container to shrink */
        min-width: 0; /* Critical: prevents flexbox from locking to the image's native width */
    }

    .logo img {
        max-width: 100%; /* Forces the image to scale down instead of overflowing */
        height: auto;
        max-height: 48px; /* Slightly reduced to buy a few extra horizontal pixels */
    }

    /* Shrink the language layout button spacing slightly on phone dimensions */
    .language-switch {
        flex-shrink: 0; /* Prevents the buttons themselves from squishing */
        gap: 0.4rem;
    }
    
    .lang-btn {
       padding: 0.4rem 0.6rem; /* Keeps them big enough to tap easily */
       font-size: 0.8rem;
       text-decoration: none !important;
    }

    /* 2 & 3. HERO CONTENT BREATHING ROOM (TOP & BOTTOM PADDING) */
    .hero {
        flex-direction: column;
        background: url(wap.jpg) center/cover no-repeat;
        padding-top: 2.5rem;    /* Generates an elegant gap below the purple navbar */
        padding-bottom: 5.5rem; /* Forces hero background space to show beautifully before 'Naše Usluge' */
        height: auto;
        min-height: auto;       /* Prevents the section container from cropping awkwardly */
    }

    .hero-container {
        flex-direction: column;
        gap: 2rem;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
        text-align: center;
    }

    .hero-content p {
        text-align: center;
        margin-bottom: 0rem;   /* Padding is now managed natively by the container system */
    }
    
    .hero-form-wrapper {
        width: 90%;
        flex: auto;
        display:none;
    }
    
    /* Mobile Hero Actions Adjustments */
    .hero-content {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center; /* Centers everything horizontally */
    }

    .hero-actions {
        justify-content: center;
        width: 100%;
        max-width: 100%;
        gap: 0.6rem; /* Tighter gap to fit all 4 */
        margin-top: 2rem;
    }

    .hero-action-btn .icon-circle {
        width: 48px; /* Slightly smaller icon circles */
        height: 48px;
        font-size: 1.2rem;
    }

    .hero-action-btn .btn-label {
        font-size: 0.65rem; /* Scaled down label to prevent text wrapping */
    }
    
    /* --- Apply Solid Colors to Mobile Action Buttons --- */
    .whatsapp-btn .icon-circle {
        background: #25D366;
        border-color: #25D366;
    }

    .call-btn .icon-circle {
        background: #34b7f1;
        border-color: #34b7f1;
    }

    .email-btn .icon-circle {
        background: var(--pink-neon);
        border-color: var(--pink-neon);
    }

    .book-btn .icon-circle {
        background: var(--accent-glow);
        border-color: var(--accent-glow);
        color: var(--nav-gradient-start); /* Dark icon on light background */
    }
    
    .secondary-form-wrapper{
        width:100%;
        flex:auto;
    }

    /* 4. TRANSPARENCY ON HERO CONTAINER FORM ONLY */
    .hero-form-wrapper .booking-form {
        background: rgba(255, 255, 255, 0.10); /* 80% solid crisp white base layer */
        backdrop-filter: blur(10px);           /* Premium iOS frosted-glass background effect */
        -webkit-backdrop-filter: blur(10px);    /* Full Safari core compatibility rendering */
        border: 1px solid rgba(255, 255, 255, 0.4);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    }
    
    .hero-form-wrapper .booking-form h3 {
    color: var(--accent-glow); /* var(--accent-glow) for golden sun yellow */
    text-shadow: 0 0 8px rgba(255, 42, 133, 0.6); /* Adds a subtle neon glow */
    }
    
    .hero-form-wrapper .booking-form input[name="email"] {
        display: none;
    }
    
    /* --- Force Mobile Date/Time Placeholders to Show --- */
    
    nav ul {
        display: none;
    }

    /* About Section Image Control (Left completely safe as you requested) */
    .about-book-section {
        flex-direction: column;
    }

    .about-image-wrapper {
        width: 100%;
        margin-top: auto;
        margin-left: auto;
        margin-right: auto;
    } 
    
    /* Responsive Mobile Footer Stacking Overrides */
    .footer-top-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.8rem;
        margin-bottom: 1.8rem;
    }
    
    .footer-social {
        align-items: center;
    }
    
    .footer-links {
        text-align: center;
    }
    
    .whatsapp-sticky {
        display: flex;
        position: fixed;
        bottom: 20px; /* Padding from bottom */
        right: 20px;  /* Padding from right */
        width: 56px;  /* Perfect thumb-sized diameter */
        height: 56px;
        background-color: #25D366; /* Authentic WhatsApp green */
        color: #ffffff;
        border-radius: 50%;
        justify-content: center;
        align-items: center;
        font-size: 30px; /* Icon size */
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
        z-index: 9999; /* Ensures it floats above forms and overlays */
        transition: transform 0.2s ease, box-shadow 0.2s ease;
        -webkit-tap-highlight-color: transparent;
        
        /* --- ADD THESE LINES TO FIX THE WHITE LINE --- */
        text-decoration: none !important; /* Kills any inherited underlines */
        line-height: 1;                   /* Centers the font icon vertically */
    }
    
    .whatsapp-sticky i {
        text-decoration: none !important;
    }

    /* Subtle press effect for mobile touch */
    .whatsapp-sticky:active {
        transform: scale(0.92);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    }
}