/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    --brand-red: #c8102e;        /* Generali Red */
    --brand-red-dark: #a00c24;   /* Darker Red for hover */
    --text-dark: #333;
    --text-light: #555;
    --bg-light: #f9f9f9;
    --bg-white: #ffffff;
    --border-color: #eee;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-light);
}

/* Background Pattern Effect (Applied to all pages) */
body::before {
    content: '';
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('images/logo-fort.png');
    background-size: 70px;
    background-repeat: repeat;
    opacity: 0.04;
    z-index: -1;
    pointer-events: none; /* Allows clicking through the background */
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; padding: 0; margin: 0; }
h1, h2, h3, h4 { margin-top: 0; }

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

/* =========================================
   2. HEADER & NAVIGATION
   ========================================= */
.header {
    background-color: var(--bg-white);
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.logo img { height: 60px; }

.logo span {
    font-family: 'Merriweather', serif;
    font-size: 1.4em;
    font-weight: bold;
    color: var(--brand-red);
}

.main-nav ul li { display: inline-block; margin-left: 25px; }

.main-nav a {
    color: var(--text-dark);
    font-weight: 600;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--brand-red);
    border-bottom-color: var(--brand-red);
}

/* =========================================
   3. COMPONENTS (Buttons, Cards, Inputs)
   ========================================= */
.btn {
    display: inline-block;
    background-color: var(--brand-red);
    color: white !important;
    padding: 15px 30px;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.3s;
}

.btn:hover {
    background-color: var(--brand-red-dark);
    transform: translateY(-2px);
    text-decoration: none;
}

.page-header {
    background-color: var(--bg-white);
    padding: 60px 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.page-header h1 { font-size: 2.5em; margin-bottom: 10px; }
.page-header p { color: var(--text-light); font-size: 1.1em; max-width: 700px; margin: 0 auto; }

/* =========================================
   4. HOME PAGE (index.html)
   ========================================= */
.hero {
    /* Note: Ideally download this image and serve locally */
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://images.unsplash.com/photo-1542744173-8e7e53415bb0?q=80&w=1470&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero h1 { font-size: 3em; margin-bottom: 20px; }
.hero p { font-size: 1.2em; max-width: 600px; margin: 0 auto 30px auto; color: white; }

.section { padding: 80px 0; }
.section-title { text-align: center; font-size: 2.5em; margin-bottom: 10px; }
.section-subtitle { text-align: center; font-size: 1.1em; color: var(--text-light); margin-bottom: 60px; }

/* Home Page Services Grid (Small Cards) */
.services-grid-home {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}

.service-item {
    background-color: var(--bg-white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.service-item .icon { font-size: 3em; color: var(--brand-red); margin-bottom: 20px; }

/* Why Us Section */
.why-us { background-color: var(--bg-white); }
.why-us-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; text-align: center; }
.why-us-item .icon { font-size: 3em; color: var(--brand-red); margin-bottom: 20px; }

.cta { background-color: var(--brand-red); color: white; text-align: center; }
.cta p { color: white; margin-bottom: 30px; }
.cta .btn { background-color: white; color: var(--brand-red) !important; }
.cta .btn:hover { background-color: #f0f0f0; }

/* =========================================
   5. ABOUT PAGE (o-nas.html)
   ========================================= */
.page-banner {
    padding: 80px 0;
    background-color: var(--bg-light);
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}
.page-banner h1 { font-size: 3em; color: var(--brand-red); margin: 0 0 10px 0; }

.content-section { padding: 60px 0; }

.story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    text-align: center;
}
.story-item h3 { color: var(--brand-red); font-size: 1.5em; margin-bottom: 10px; }

.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    text-align: center;
    margin-top: 50px;
}
.value-item .icon { font-size: 3em; color: var(--brand-red); }
.value-item h3 { font-size: 1.3em; margin: 15px 0 10px 0; }

.highlight-box {
    background-color: #fdf5f6;
    border: 2px solid #f8d7da;
    border-radius: 8px;
    padding: 40px;
    margin-top: 60px;
}
.highlight-box h3 { font-size: 1.8em; color: #721c24; text-align: center; }
.highlight-box ul { list-style-type: none; padding-left: 20px; font-size: 1.1em; }
.highlight-box li { margin-bottom: 10px; position: relative; padding-left: 25px;}
.highlight-box li::before { content: '✓'; position: absolute; left: 0; color: var(--brand-red); font-weight: bold; }

/* =========================================
   6. SERVICES PAGE (storitve.html)
   ========================================= */
/* Detailed Services Grid (Big Cards) */
.services-grid-detailed {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.service-card {
    background-color: var(--bg-white);
    border-radius: 8px;
    padding: 30px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: flex-start;
}

.service-icon { font-size: 2.5em; margin-right: 25px; margin-top: 5px; }
.service-content h3 { margin-top: 0; margin-bottom: 10px; font-size: 1.4em; color: var(--brand-red); }
.service-content p { margin: 0; color: var(--text-light); }

.cta-section {
    text-align: center;
    padding: 60px 0;
    background-color: var(--bg-white);
    border-top: 1px solid var(--border-color);
    margin-top: 30px;
}
.cta-section h2 { margin-top: 0; font-size: 2em; }
.cta-section p { margin-bottom: 30px; font-size: 1.1em; color: var(--text-light); }

/* =========================================
   7. CAREER PAGE (kariera.html)
   ========================================= */
.career-section { padding: 60px 0; }
.career-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background-color: var(--bg-white);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.career-grid h3 { font-size: 1.5em; color: var(--brand-red); }
.career-grid ul { list-style-type: none; padding-left: 0; }
.career-grid li {
    padding-left: 25px;
    margin-bottom: 10px;
    font-size: 1.1em;
    position: relative;
}
.career-grid li::before { content: '✓'; position: absolute; left: 0; color: var(--brand-red); font-weight: bold; }

/* =========================================
   8. CONTACT & LOCATIONS (kontakt-lokacije.html)
   ========================================= */
.map-section {
    padding: 40px 0;
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
}
.map-section iframe { border:0; width: 100%; height: 450px; }

.office-section, .team-section { padding: 40px 0; border-bottom: 1px solid #ddd; }
.office-title, .team-title { font-size: 2em; color: var(--brand-red); padding-bottom: 10px; margin-bottom: 30px; }

.office-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.office-info-box h3 { margin-top: 0; margin-bottom: 15px; color: var(--text-dark); }
.office-info-box p { margin: 0 0 10px 0; }
.office-info-box strong { color: var(--text-light); }

.contact-link { color: var(--brand-red); font-weight: bold; }
.contact-link:hover { text-decoration: underline; }

/* Agents Grid */
.agent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.agent-card {
    background: var(--bg-white);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
    transition: transform 0.3s, box-shadow 0.3s;
}

.agent-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.agent-name { font-size: 1.2em; font-weight: bold; margin: 0 0 5px 0; color: var(--text-dark); }
.agent-role { font-size: 0.9em; color: var(--text-light); margin-bottom: 15px; font-style: italic; }
.agent-contact p { margin: 8px 0; font-size: 0.95em; display: flex; align-items: center; }
.agent-contact p span { margin-left: 8px; }

/* =========================================
   9. FOOTER
   ========================================= */
.footer {
    background-color: #222;
    color: #ccc;
    padding: 50px 0 15px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
    align-items: start;
}

.footer-logos-container { display: flex; align-items: center; gap: 35px; }

.footer-logo img { max-height: 140px; opacity: 0.8; transition: opacity 0.3s; }
.footer-logo img:hover { opacity: 1; }

.partner-logo-group { text-align: center; }
.partner-logo-group h4 { margin-bottom: 10px; font-size: 1em; color: white; }
.partner-logo-link img { max-height: 100px; opacity: 0.8; transition: opacity 0.3s; }
.partner-logo-link img:hover { opacity: 1; }

.footer-col h4 { color: white; margin-bottom: 20px; margin-top: 0; }
.footer-col p, .footer-col a { color: #ccc; text-decoration: none; font-weight: normal; }
.footer-col a:hover { color: white; text-decoration: underline; }

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    font-size: 0.9em;
}

/* =========================================
   10. RESPONSIVE MEDIA QUERIES
   ========================================= */
@media (max-width: 900px) {
    /* Storitve cards stack on smaller screens */
    .services-grid-detailed { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .header .container { flex-direction: column; }
    .main-nav { margin-top: 15px; }
    
    /* Stack all grids on mobile */
    .why-us-grid, 
    .footer-grid, 
    .career-grid,
    .office-info-grid,
    .values-grid { 
        grid-template-columns: 1fr; 
    }
    
    .footer-grid { text-align: center; }
    .footer-logos-container { flex-direction: column; }
}