/* Project: DAVEL d.o.o. Official Website
   Theme: Professional / Industrial / Technical
   Color Palette: 
   - Primary: #2c3e50 (Midnight Blue)
   - Secondary: #2c3e50 (Safety Orange)
   - Accent: #f4f4f4 (Light Gray)
*/

/* 1. Global Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-padding-top: 105px; /* Compensates for sticky navbar when clicking menu links */
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    overflow-x: hidden; /* Prevent horizontal scroll on mobile */
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 0 30px;
}

/* 2. Navigation */
.navbar {
    background: #2c3e50;
    color: #fff;
    padding: 1.2rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.logo-img {
    height: 4rem; /* Matches the 2rem font-size of the logo text */
    width: auto;
    vertical-align: middle;
    margin-right: 10px;
}

.logo span {
    color: #ffffff;
    font-size: 1rem;
}

.nav-links {
    display: flex;
    list-style: none;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 4px 0;
    transition: all 0.3s ease-in-out;
    border-radius: 3px;
}

/* Hamburger Animation */
.menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
.menu-toggle.is-active .bar:nth-child(1) { transform: translateY(11px) rotate(45deg); }
.menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-11px) rotate(-45deg); }

.nav-links li a {
    color: #fff;
    text-decoration: none;
    padding: 0 15px;
    font-weight: 400;
    transition: color 0.3s ease;
}

.nav-links li a:hover {
    background-color: #f9f9f9;
    color: #2c3e50;
    border-radius: 4px;
    transform: translateY(-2px);
}

/* 3. Hero Section */
.hero {
    background: linear-gradient(rgba(0,0,0,0.65), rgba(0,0,0,0.65)), 
                url('img/background1.png');
    background-size: cover;
    background-position: center;
    height: 65vh;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem;
}

.btn {
    display: inline-block;
    background: #2c3e50;
    color: #fff;
    padding: 15px 35px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 700;
    transition: background 0.3s ease, transform 0.2s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: #f9f9f9;
    color: #2c3e50;
    transform: translateY(-2px);
}

/* 4. Sections & Titles */
section {
    padding: 50px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
    font-size: 2.5rem;
    position: relative;
    color: #2c3e50;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: #2c3e50;
    margin: 15px auto 0;
}

/* 5. Services Section */
.services-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.service-card {
    background: #f9f9f9;
    padding: 30px 18px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 1 185px;
    max-width: 260px;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-bottom: 4px solid #2c3e50;
}

.service-icon {
    width: 100%;
    max-width: 110px;
    height: auto;
    margin-bottom: 18px;
    border-radius: 50%;
    border: 3px solid #2c3e50;
    padding: 5px;
    background: #fff;
}

.service-card h3 {
    margin-bottom: 11px;
    color: #2c3e50;
}

/* 6. About Section */
.about {
    background-color: #f4f4f4;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* 7. Contact Section (Map Focused) */

.contact {
    background-color: #f4f4f4;
}

.contact-wrapper {
    display: grid;
    /* Grid Ratio: 1 part text, 1.5 parts map (50% larger map) */
    grid-template-columns: 1fr 1.5fr; 
    gap: 50px;
    align-items: start;
}

.contact-info h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.contact-info p {
    margin-bottom: 10px;
}

.contact-info a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 700;
}

.map-container {
    width: 100%;
    box-shadow: 0 10px 40px #2c3e50;
    border-radius: 12px;
    overflow: hidden;
}

.map-container iframe {
    display: block;
    width: 100%;
    height: 500px; /* Tall height to match the wider map */
}

/* Contact Details spacing for mobile */
.contact-info p {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.contact-info strong {
    min-width: 80px;
    display: inline-block;
    color: #2c3e50;
}

/* 8. Footer */
footer {
    background: #2c3e50;
    color: #fff;
    text-align: center;
    padding: 40px 0;
    border-top: 5px solid #2c3e50;
}

/* 9. Responsive Design */

/* Large Tablets & Small Laptops */
@media (max-width: 992px) {
    .contact-wrapper {
        grid-template-columns: 1fr; /* Stack text above map */
    }
    
    .hero h1 {
        font-size: 2.8rem;
    }
}

/* Mobile Devices */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: #2c3e50;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: 0.4s ease;
        box-shadow: -5px 0 15px rgba(0,0,0,0.3);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin: 20px 0;
    }

    .nav-links li a {
        font-size: 1.5rem;
        padding: 10px 20px;
    }
    
    .hero {
        height: 70vh;
    }

    .container {
        padding: 0 20px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .map-container iframe {
        height: 350px; /* Reduced height for vertical mobile view */
    }
}

/* 10. Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}