/* Basic Reset and Box Sizing */
* {
    margin: 0;
    box-sizing: border-box; /* ADDED: Ensure padding/border is included in element's total width/height */
    --secondary-color: #27ae60;  /* Light Green for accents */
    --text-color: #34495e;       /* Dark Gray */
    --background-color: #f8f8f8; /* Light Gray */
    --accent-color: #2ecc71;     /* Brighter Green for buttons/hover */
    --light-gray: #ecf0f1;       /* Even lighter gray for some backgrounds */
    --border-color: #ddd;        /* Light border color */
    --error-color: #e74c3c;      /* Red for error messages */
    --primary-color: #2c3e50; /* Assuming you have a primary color defined elsewhere or this is it */
}

/* Base Body Styles and Grid Layout for Desktop */
body {
    font-family: 'Lato', 'Open Sans', 'Arial', 'Helvetica', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    display: grid;
    grid-template-areas:
        "header header"
        "main aside"
        "footer footer";
    grid-template-columns: 2fr 1fr; /* Main content 2/3, sidebar 1/3 */
    grid-template-rows: auto 1fr auto; /* Header and footer auto height, main/aside fill remaining space */
    min-height: 100vh; /* Ensures footer stays at the bottom */
    gap: 20px; /* Gap between grid areas */
    max-width: 1200px; /* Maximum content width */
    margin: 0 auto; /* Center the layout */
    padding: 20px; /* Padding around the main layout */
}

/* Header Styles */
header {
    grid-area: header;
    background-color: var(--primary-color);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between; /* Pushes logo and nav to edges */
    align-items: center; /* Vertically centers items */
    color: white; /* Text color for header content */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative; /* ADDED: Crucial for absolute positioning of mobile menu */
}

header img {
    height: 80px;
    width: auto;
    display: block;
}

/* Navigation Styles */
nav ul {
    list-style: none;
    display: flex; /* Horizontal menu for desktop */
    margin: 0; /* Ensures no default margin */
    padding: 0; /* Ensures no default padding */
}

nav ul li a {
    text-decoration: none;
    color: white;
    padding: 10px 15px;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
    border-radius: 5px;
}

nav ul li a:hover,
nav ul li a.active {
    background-color: var(--secondary-color);
    color: white;
}

/* Hamburger menu - Hidden by default on desktop */
.hamburger-menu {
    display: none; /* Hides it on desktop */
    width: 30px;
    height: 25px;
    flex-direction: column;
    justify-content: space-around;
    cursor: pointer;
    z-index: 1000;
}

.hamburger-menu div {
    width: 100%;
    height: 3px;
    background-color: white;
    transition: all 0.3s ease-in-out;
}

/* --- Media Queries for Responsiveness --- */

/* Tablet and Mobile Styles (max-width: 768px) */
@media (max-width: 768px) {
    body {
        grid-template-areas:
            "header header"
            "main main"
            "aside aside"
            "footer footer";
        grid-template-columns: 1fr; /* Single column layout */
        padding: 15px;
        gap: 15px;
    }

    header {
        /* On smaller screens, keep logo and hamburger on one row */
        flex-direction: row; /* Overrides default column for header */
        justify-content: space-between;
        align-items: center;
        padding: 15px; /* Adjust padding as needed */
    }

    header img {
        height: 70px; /* Slightly smaller logo for tablets/mobiles */
    }

    /* Hide the regular desktop navigation */
    nav ul {
        display: none; /* HIDDEN BY DEFAULT ON TABLET/MOBILE */
        flex-direction: column; /* Prepare for vertical stacking */
        position: absolute; /* Position the mobile menu */
        top: 100%; /* Positions the menu right below the header */
        left: 0;
        width: 100%;
        background-color: var(--primary-color);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 999;
        /* Animation for opening/closing */
        transition: max-height 0.3s ease-out;
        overflow: hidden; /* Important for the max-height animation */
        max-height: 0; /* Starts hidden, will expand when 'active' */
    }

    /* Show the hamburger menu icon */
    .hamburger-menu {
        display: flex; /* SHOWS IT ON TABLET/MOBILE */
    }

    /* Styles for when the mobile menu is active (JS adds 'active' class to nav ul) */
    nav ul.active {
        max-height: 500px; /* A value large enough to show all menu items */
        /* You can adjust this value based on your actual menu content height */
    }

    nav ul li {
        margin-bottom: 0; /* Reset desktop margin */
        width: 100%;
        text-align: center;
    }

    nav ul li a {
        display: block; /* Make links block level for better click area */
        padding: 12px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Subtle separator */
    }

    nav ul li:last-child a {
        border-bottom: none; /* No border for the last item */
    }

    main, aside {
        padding: 25px;
    }

    main h1 {
        font-size: 2em;
    }

    aside {
        border-left: none; /* Remove left border on tablet */
        border-top: 1px solid var(--border-color); /* Add top border for separation */
    }

    .gallery-container {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* Mobile Specific Styles (max-width: 480px) - Fine-tuning for smaller phones */
@media (max-width: 480px) {
    body {
        padding: 10px;
        gap: 10px;
    }

    header img {
        height: 60px; /* Make logo even smaller on very small phones */
    }

    main, aside {
        padding: 20px;
    }

    main h1 {
        font-size: 1.8em;
    }

    main h2 {
        font-size: 1.6em;
    }

    aside h2 {
        font-size: 1.6em;
    }

    footer {
        padding: 15px;
        font-size: 0.9em;
    }

    /* Hamburger icon animation when active */
    .hamburger-menu.active div:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    .hamburger-menu.active div:nth-child(2) {
        opacity: 0;
    }
    .hamburger-menu.active div:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .gallery-item img {
        height: 150px; /* Adjust height for smaller screens */
    }
}


/* Main Content Styles */
main {
    grid-area: main;
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

main h1 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 2.5em;
    text-align: center;
}

main h2 {
    color: var(--primary-color);
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 2em;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
}

.section-references h2 {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 25px;
}

main p {
    margin-bottom: 15px;
    line-height: 1.7;
}

/* CTA Button Styles */
.button {
    display: inline-block;
    padding: 12px 25px;
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
}

.button:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
}

.button-small {
    padding: 8px 15px;
    font-size: 0.9em;
}

/* Section "Prečo repasované?" */
.section-why-repas {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.section-why-repas ul {
    list-style: none;
    padding-left: 0;
}

.section-why-repas ul li {
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}

.section-why-repas ul li::before {
    content: "✅";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
}

/* Section "Referencie" - UPRAVENÉ ŠTÝLY PRE RECENZIE */
.section-references {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.reference-item {
    background-color: var(--light-gray);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--secondary-color);
}

.reference-item p:first-of-type {
    font-style: italic;
    margin-bottom: 10px;
    color: var(--text-color);
}

.reference-item p:last-of-type {
    font-weight: bold;
    text-align: right;
    color: var(--primary-color);
}

/* Nový štýl pre "poznámkový blok" pre užívateľov */
.user-note {
    background-color: var(--light-gray);
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--secondary-color);
    padding: 15px 20px;
    margin-top: 25px;
    margin-bottom: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    font-size: 0.95em;
    color: var(--text-color);
}

.user-note p {
    margin-bottom: 0;
    line-height: 1.5;
}

.user-note strong {
    color: var(--primary-color);
}


/* "O nás" page specific styles */
.section-process ol {
    list-style: decimal;
    padding-left: 25px;
}

.section-process ol li {
    margin-bottom: 10px;
}

.section-values ul {
    list-style: none;
    padding-left: 0;
}

.section-values ul li {
    margin-bottom: 8px;
    padding-left: 25px;
    position: relative;
    font-weight: bold;
    color: var(--primary-color);
}

.section-values ul li::before {
    content: "🌟";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
}

/* Gallery Styles (galeria.html) */
.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    justify-items: center;
    margin-top: 30px;
}

.gallery-item {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

.gallery-item img {
    max-width: 100%;
    height: 180px;
    object-fit: contain;
    border-radius: 5px;
    margin-bottom: 15px;
    display: block;
}

.gallery-item h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.5em;
}

.gallery-item p {
    color: var(--text-color);
    margin-bottom: 8px;
    font-size: 0.95em;
}

.gallery-item .price {
    font-weight: bold;
    color: var(--secondary-color);
    font-size: 1.1em;
    margin-top: 10px;
    margin-bottom: 15px;
}

/* Štýly pre Slider v galeria.html */
.slider-section {
    margin-top: 40px;
    margin-bottom: 40px;
    text-align: center;
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.slider-section h2 {
    font-size: 2em;
    color: var(--primary-color);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
    display: inline-block;
}

.slider-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    background-color: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.slider-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: opacity 0.5s ease-in-out;
    padding: 20px;
}

.slider-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 15px 20px;
    text-align: left;
}

.slider-content h3 {
    color: white;
    margin-bottom: 5px;
    font-size: 1.6em;
}

.slider-content p {
    color: #e0e0e0;
    font-size: 0.95em;
    margin-bottom: 0;
}

.slider-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 1.5em;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    z-index: 10;
}

.slider-button:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.prev-button {
    left: 10px;
}

.next-button {
    right: 10px;
}


/* Sidebar Styles */
aside {
    grid-area: aside;
    background-color: var(--light-gray);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-left: 1px solid var(--border-color);
}

aside h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.8em;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
}

aside ul {
    list-style: none;
    padding: 0;
}

aside ul li {
    margin-bottom: 10px;
    padding-left: 10px;
    border-left: 3px solid var(--accent-color);
}

aside ul li a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s ease;
}

aside ul li a:hover {
    color: var(--secondary-color);
}

/* Footer Styles */
footer {
    grid-area: footer;
    background-color: var(--primary-color);
    color: white;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    margin-top: 20px;
}

/* General Link Styling (if not covered by nav) */
a {
    color: var(--secondary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Contact Page Styles (kontakt.html) */
.contact-info {
    margin-bottom: 30px;
}

.contact-info p {
    margin-bottom: 8px;
}

.contact-info strong {
    color: var(--primary-color);
}

.contact-form-section {
    background-color: var(--light-gray);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#contactForm {
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 1em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus,
.form-group textarea:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.2);
    outline: none;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group .error-message {
    color: var(--error-color);
    font-size: 0.9em;
    margin-top: 5px;
    display: none;
}

/* Style for submit button, reusing .button class */
#contactForm .button {
    align-self: flex-start;
    margin-top: 10px;
    margin-bottom: 0;
}

.map-container {
    margin-top: 40px;
    background-color: var(--light-gray);
    border-radius: 8px;
    overflow: hidden;
    min-height: 300px;
    border: 1px solid var(--border-color);
}