/* Saqaf-Inspired Redesign - Industrial/Services Theme */
:root {
    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;

    /* Palette */
    --color-navy: #0A192F;
    /* Deepest Navy - Primary Dark */
    --color-navy-light: #172A45;
    /* Lighter Navy - Cards/Sections */
    --color-gold: #FFB400;
    /* Vibrant Gold/Orange - Accent */
    --color-gold-hover: #E5A100;

    --color-text-dark: #1F2937;
    --color-text-light: #6B7280;
    --color-text-white: #F9FAFB;

    --color-bg-white: #FFFFFF;
    --color-bg-offset: #F3F4F6;
    /* Light Grey for Contrast */

    --border-radius: 4px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    --max-width: 1280px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--color-text-light);
    line-height: 1.7;
    font-size: 16px;
    background: var(--color-bg-white);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-navy);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* --- UTILITIES --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 50px 0;
    position: relative;
}

.bg-offset {
    background-color: var(--color-bg-offset);
}

/* --- BUTTONS --- */
.nav-btn,
.btn {
    display: inline-block;
    background: var(--color-gold);
    color: var(--color-navy);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 14px;
    padding: 14px 32px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.nav-btn:hover,
.btn:hover {
    background: var(--color-gold-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* --- HEADER --- */
.site-header {
    background: var(--color-bg-white);
    height: 90px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    padding: 5px 0;
}

.logo img {
    height: 60px;
    /* Reduced height to fit in 90px header */
    width: auto;
    display: block;
}

.nav-bar {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-item {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14px;
    color: var(--color-navy);
    text-transform: uppercase;
    position: relative;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-gold);
    transition: var(--transition);
}

.nav-item:hover::after {
    width: 100%;
}

/* --- HERO SECTION --- */
/* Saqaf Style: Dark, Immersive, Industrial overlay */
.hero {
    position: relative;
    height: 40vh;
    min-height: 250px;
    display: flex;
    align-items: center;
    color: white;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: url('https://images.unsplash.com/photo-1503387762-592deb58ef4e?q=80&w=2089&auto=format&fit=crop');
    /* Industrial Building */
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.hero::after {
    /* Gradient Overlay */
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(10, 25, 47, 0.95) 0%, rgba(10, 25, 47, 0.7) 60%, rgba(10, 25, 47, 0.4) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin-left: 10%;
    /* Left aligned */
}

.hero-label {
    color: var(--color-gold);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 14px;
    margin-bottom: 24px;
    display: block;
    position: relative;
    padding-left: 50px;
}

.hero-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 40px;
    height: 2px;
    background: var(--color-gold);
}

.hero h1 {
    color: white;
    font-size: 64px;
    margin-bottom: 32px;
    line-height: 1.1;
    font-weight: 800;
}

.hero p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
    max-width: 500px;
}

/* --- SERVICES GRID --- */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.grid-card {
    background: white;
    padding: 40px 30px;
    border: 1px solid #E5E7EB;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.grid-card::before {
    /* Accent Line Top */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--color-gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

.grid-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: white;
}

.grid-card:hover::before {
    transform: scaleX(1);
}

.card-icon-circle {
    font-size: 40px;
    margin-bottom: 24px;
    display: block;
}

.grid-card h3 {
    font-size: 20px;
    margin-bottom: 16px;
    transition: color 0.3s;
}

.grid-card:hover h3 {
    color: var(--color-gold-hover);
    /* Saqaf style orange/gold highlight */
}

.grid-card p {
    font-size: 15px;
    color: var(--color-text-light);
    line-height: 1.6;
}


/* --- STATS SECTION --- */
.stats-section {
    background: var(--color-navy);
    color: white;
    padding: 120px 0;
    position: relative;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.stat-item {
    text-align: center;
    position: relative;
    z-index: 2;
}

.stat-item h2 {
    font-size: 56px;
    color: var(--color-gold);
    /* Gold Numbers */
    margin-bottom: 8px;
    font-weight: 800;
}

.stat-item span {
    color: white;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}


/* --- FOOTER --- */
footer {
    background: #050D19;
    /* Even darker Navy */
    color: #9CA3AF;
    padding: 80px 0 40px;
}

.footer-col h4 {
    color: white;
    margin-bottom: 24px;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col a:hover {
    color: var(--color-gold);
    padding-left: 5px;
    /* Slight movement */
}

/* --- FORMS --- */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--color-navy);
}

.form-input,
.form-select {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 1px solid #D1D5DB;
    border-radius: var(--border-radius);
    font-family: var(--font-body);
    transition: var(--transition);
    background: #F9FAFB;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-gold);
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 180, 0, 0.1);
}

.form-submit {
    display: inline-block;
    background: var(--color-navy);
    color: white;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 16px;
    padding: 16px 40px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    border: none;
    cursor: pointer;
    width: 100%;
}

.form-submit:hover {
    background: var(--color-navy-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* --- ACCORDION / FAQ --- */
details {
    margin-bottom: 16px;
    border: 1px solid #E5E7EB;
    border-radius: var(--border-radius);
    background: white;
    overflow: hidden;
    transition: var(--transition);
}

details[open] {
    box-shadow: var(--shadow-md);
    border-color: var(--color-gold);
}

summary {
    padding: 20px 24px;
    font-size: 18px;
    font-weight: 600;
    color: var(--color-navy);
    cursor: pointer;
    list-style: none;
    position: relative;
    padding-right: 50px;
    transition: background 0.2s;
}

summary:hover {
    background: #F9FAFB;
}

summary::-webkit-details-marker {
    display: none;
}

summary::after {
    content: '+';
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 300;
    font-size: 24px;
    color: var(--color-gold);
}

/* Hero Columns Hover */
.hero-col:hover {
    transform: translateY(-5px);
    background: rgba(255, 180, 0, 0.1) !important;
    border-color: var(--color-gold) !important;
}

/* Cookie Popup */
.cookie-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--color-navy);
    color: white;
    padding: 30px;
    /* Increased padding */
    width: 450px;
    /* Increased width */
    border-radius: 4px;
    /* "Kockast" - subtle radius or 0 if strictly square, 4px is standard "box" look */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    display: none;
    /* Hidden by default, shown via JS */
    flex-direction: column;
    gap: 20px;
    /* Increased gap */
}

.cookie-popup p {
    font-size: 16px;
    /* Increased font size */
    line-height: 1.6;
    margin: 0;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
}

.btn-accept {
    background-color: var(--color-gold);
    color: black;
    /* "zuta s crnim slovima" */
    border: none;
    padding: 10px 20px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    cursor: pointer;
    border-radius: 2px;
    flex: 1;
    font-family: var(--font-heading);
}

.btn-accept:hover {
    background-color: var(--color-gold-hover);
}

.btn-more {
    background-color: black;
    color: white;
    /* "crna s bijelim slovima" */
    border: none;
    padding: 10px 20px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    cursor: pointer;
    border-radius: 2px;
    text-decoration: none;
    text-align: center;
    flex: 1;
    font-family: var(--font-heading);
}

.btn-more:hover {
    background-color: #333;
    color: white;
}

@media (max-width: 600px) {
    .cookie-popup {
        left: 20px;
        width: auto;
    }
}

details[open] summary::after {
    content: '-';
    font-weight: 700;
}

details p,
details ul {
    padding: 0 24px 24px;
    color: var(--color-text-light);
    line-height: 1.6;
    margin: 0;
    border-top: 1px solid transparent;
}

details[open] p {
    border-top-color: #F3F4F6;
    padding-top: 16px;
}

/* --- MOBILE --- */
/* Mobile Menu */
.hamburger {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--color-navy);
    z-index: 1001;
}

.mobile-nav-overlay {
    position: fixed;
    top: 90px;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 20px;
    display: none;
    flex-direction: column;
    gap: 15px;
    z-index: 999;
}

.mobile-nav-overlay.active {
    display: flex;
}

.mobile-nav-overlay a {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-navy);
    text-transform: uppercase;
    font-size: 16px;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}

/* Service Card Responsive */
.service-card-tanker {
    min-width: 350px;
}

/* Fix for O Nama page grid: Reset min-width when inside a grid */
.grid-4 .service-card-tanker {
    min-width: 0;
}

/* Mobile Responsive */
@media (max-width: 968px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-5 {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-content {
        margin-left: 24px;
        max-width: 100%;
    }

    .hero h1 {
        font-size: 42px;
        /* Slightly smaller for tablet */
    }
}

@media (max-width: 768px) {

    /* Global Fonts Reduce */
    body {
        font-size: 14px;
        line-height: 1.6;
    }

    h1 {
        font-size: 32px !important;
    }

    h2 {
        font-size: 24px !important;
        margin-bottom: 20px !important;
    }

    h3 {
        font-size: 20px !important;
    }

    .hero p {
        font-size: 16px !important;
    }

    /* Usluge Grid: 1 column as requested */
    .grid-4 {
        grid-template-columns: 1fr !important;
        gap: 30px;
    }

    .grid-5 {
        grid-template-columns: 1fr !important;
        gap: 30px;
    }

    /* Specific override for service cards container if different */
    .services-grid {
        grid-template-columns: 1fr !important;
    }

    .nav-bar {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .header-container {
        justify-content: space-between;
    }

    .hero-col {
        padding: 10px !important;
    }

    /* O Nama Section Order: Image (2nd div) first, Text (1st div) second */
    /* Target via generic selector if no class, assuming structure: 
       .section > .container > .grid-4 > div:nth-child(1) (Text)
       .section > .container > .grid-4 > div:nth-child(2) (Image)
       BUT grid-4 is used everywhere. I need a specific class in HTML. 
       I will add 'o-nama-grid' class to HTML. For now, use a hacky selector or wait for HTML update. 
       Actually, I can target by style attribute match if desperate, but better update HTML.
       Let's assume I will add class 'o-nama-mobile-reverse' to the grid-4 in index.html.
    */
    .o-nama-mobile-reverse {
        display: flex !important;
        flex-direction: column-reverse;
    }

    .o-nama-mobile-reverse>div {
        width: 100% !important;
        padding: 30px 20px !important;
        /* Reset padding */
        min-height: 300px;
        /* Ensure image has height */
    }

    /* Carousel: Show 1 item on mobile */
    .service-card-tanker {
        min-width: 85vw !important;
        /* Show 1 item with peek or full */
        height: 400px !important;
        /* Reduced height */
        margin-right: 10px;
    }

    .service-card-tanker h3 {
        font-size: 24px !important;
    }

    .service-card-tanker p {
        font-size: 14px !important;
        display: block;
        /* Show description */
    }

    .carousel-nav button {
        width: 35px !important;
        height: 35px !important;
    }

    /* Stats grid: Fit in 2 rows means 2 columns 2 rows. 
       But current is 4 items. So 2x2 grid. 
       "Smanji font da sve stane" */
    .stats-section .grid-4 {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .stat-item h2 {
        font-size: 32px !important;
        /* Smaller number */
    }

    .stat-item span {
        font-size: 12px !important;
        /* Smaller label */
    }

    /* Kontakt Page Overrides (if I can't edit HTML structure easily) */
    /* If Kontakt page uses grid-4, it will be 1 column. 
       If "Info" is 1st col, "Emergency" 2nd col, "Map" 3rd col. 
       Default stack is 1, 2, 3. 
       User wants: Info (1), Emergency (2), Map (3?). 
       If current order is different, I need to check. 
       Assuming standard flow is correct, just 1fr grid handles it. */

    /* Footer */
    .footer-col {
        text-align: center;
    }

    /* Contact Page Mobile Order */
    .contact-mobile-order {
        display: flex !important;
        flex-direction: column;
    }

    .contact-info-col {
        order: 1;
    }

    .contact-map-col {
        order: 3;
    }

    .emergency-box {
        order: 2;
        /* Ensure emergency box is between info and map if possible, or just part of info col */
        margin-top: 20px !important;
    }
}

/* --- MODAL (Missing) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 24px;
}

.modal-overlay.open {
    display: flex;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 4px;
    max-width: 600px;
    width: 100%;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    line-height: 1;
    color: #9CA3AF;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--color-navy);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-group {
        margin-bottom: 16px;
    }

    .modal-content {
        padding: 24px;
        margin: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }
}