/* VšeProLes.eu Custom Styles - Mobile First Design */

/* Reset and base styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
    background-color: #f8f8f8;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Page container - Mobile First */
#page {
    background-color: white;
    width: 100%;
}

/* Header styles - Mobile First */
#header {
    background: white;
    padding: 15px;
    border-bottom: 2px solid #4a7c59;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    max-width: 1200px;
}

.site-logo img {
    max-width: 120px;
    height: auto;
}

.site-name h1 {
    color: #2c5234;
    font-size: 1.5em;
    margin: 10px 0 5px 0;
    text-align: center;
}

.site-name h1 a {
    color: #2c5234;
    text-decoration: none;
}

.site-slogan h2 {
    color: #666;
    font-size: 1em;
    font-weight: normal;
    margin: 5px 0 15px 0;
    text-align: center;
    font-style: italic;
}

/* Burger Menu Button - Mobile First */
.menu-toggle {
    display: block;
    background: none;
    border: none;
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: #2c5234;
    margin: 5px auto;
    transition: all 0.3s ease;
    border-radius: 1px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Navigation menu - Mobile First */
#primary-menu {
    width: 100%;
}

#primary-menu ul.menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: none;
    flex-direction: column;
    background-color: #4a7c59;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

#primary-menu ul.menu.active {
    display: flex;
}

#primary-menu ul.menu li {
    border-bottom: 1px solid #5a8c69;
}

#primary-menu ul.menu li:last-child {
    border-bottom: none;
}

#primary-menu ul.menu li a {
    display: block;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s;
    font-size: 16px;
}

#primary-menu ul.menu li a:hover,
#primary-menu ul.menu li a.active {
    background-color: #5a8c69;
}

/* Content layout - Mobile First (Single Column) */
#content {
    display: flex;
    flex-direction: column;
    padding: 15px;
    gap: 20px;
}

#leftcolumn {
    order: 1;
    background: white;
    width: 100%;
}

#sidebar {
    order: 2;
    background: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    width: 100%;
}

/* Main content blocks - Mobile First */
.block {
    background: white;
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.block h1 {
    color: #2c5234;
    border-bottom: 3px solid #4a7c59;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 1.4em;
}

.block h2 {
    color: #2c5234;
    border-bottom: 2px solid #4a7c59;
    padding-bottom: 8px;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.block h3 {
    color: #4a7c59;
    margin-top: 20px;
    font-size: 1.2em;
}

/* Photo gallery styling - similar to original carousel */
.view-content {
    margin: 20px 0;
}

.jcarousel-container {
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.jcarousel img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 3px;
}

/* Sidebar styling - like original */
#sidebar .block {
    background: white;
    border: 1px solid #ddd;
}

#sidebar .block h2 {
    background: #4a7c59;
    color: white;
    margin: -20px -20px 15px -20px;
    padding: 10px 20px;
    font-size: 1.1em;
}

#sidebar .block h3 {
    color: #2c5234;
    font-size: 1.1em;
    margin-bottom: 10px;
}

#sidebar strong {
    color: #2c5234;
}

#sidebar ul {
    margin: 10px 0;
    padding-left: 20px;
}

#sidebar ul li {
    margin-bottom: 5px;
}

/* Contact info highlighting */
.contact-info {
    background: #e8f4ea;
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid #4a7c59;
    margin: 15px 0;
}

.contact-info strong {
    color: #2c5234;
    font-size: 1.1em;
}

/* Service lists styling - Mobile optimized */
ul li {
    line-height: 1.6;
    margin-left: 12px;
}

p {
    margin-bottom: 16px;
    line-height: 1.6;
}

a {
    color: #4a7c59;
    text-decoration: none;
    touch-action: manipulation;
    display: inline-block;
    line-height: 1.4;
}

a:hover, a:focus {
    color: #2c5234;
    text-decoration: underline;
    outline: 2px solid #4a7c59;
    outline-offset: 2px;
}

/* Better touch targets for mobile */
button, .menu-toggle {
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
}

/* Buttons and call-to-action */
.cta-box {
    background: linear-gradient(135deg, #4a7c59, #5a8c69);
    color: white;
    padding: 20px;
    border-radius: 5px;
    margin: 20px 0;
    text-align: center;
}

.cta-box strong {
    font-size: 1.2em;
}

.cta-box a {
    color: #fff;
    font-weight: bold;
    text-decoration: underline;
}

/* Footer */
#footer {
    background: #2c5234;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

/* Responsive design */
@media (max-width: 768px) {
    #content {
        flex-direction: column;
        padding: 10px 15px;
    }
    
    #header {
        padding: 15px;
    }
    
    .site-name h1 {
        font-size: 1.5em;
    }
    
    .site-slogan h2 {
        font-size: 1em;
    }
    
    #primary-menu ul.menu {
        flex-direction: column;
    }
    
    #primary-menu ul.menu li {
        border-right: none;
        border-bottom: 1px solid #5a8c69;
    }
    
    #primary-menu ul.menu li:last-child {
        border-bottom: none;
    }
}

/* Hide the current theme's headline system, we'll use traditional layout */
#headline, #headline-list {
    display: none !important;
}

/* Show the traditional content */
.region-content {
    display: block !important;
}

/* Gallery improvements - Mobile First */
.photo-gallery {
    margin: 15px 0;
}

.photo-gallery h3 {
    color: #4a7c59;
    margin-bottom: 15px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
    font-size: 1.1em;
}

.photo-gallery div {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
    -webkit-overflow-scrolling: touch;
}

.photo-gallery img {
    width: 250px;
    height: 188px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #ddd;
    transition: transform 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.photo-gallery img:hover {
    transform: scale(1.02);
    border-color: #4a7c59;
}

/* Breadcrumb styling */
.breadcrumb {
    background: #f5f5f5;
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 3px;
    font-size: 0.9em;
}

.breadcrumb a {
    color: #4a7c59;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Page title styling */
.block h1 {
    color: #2c5234;
    border-bottom: 3px solid #4a7c59;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Better spacing for content blocks */
.block .content > h2 {
    color: #4a7c59;
    margin-top: 25px;
    margin-bottom: 15px;
}

.block .content > h3 {
    color: #2c5234;
    margin-top: 20px;
    margin-bottom: 10px;
}

/* Improve link styling */
.content a:not(.cta-box a) {
    color: #4a7c59;
    font-weight: normal;
}

.content a:not(.cta-box a):hover {
    color: #2c5234;
}

/* Gallery page styling */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
    border: 2px solid #ddd;
}

.gallery img:hover {
    transform: scale(1.05);
    border-color: #4a7c59;
}

/* Photo gallery modal styles */
.photo-gallery img {
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.photo-gallery img:hover {
    transform: scale(1.02);
    opacity: 0.9;
}

/* Modal overlay */
.gallery-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.gallery-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Modal content */
.modal-content {
    position: relative;
    max-width: 95%;
    max-height: 95%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Navigation buttons */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(74, 124, 89, 0.9);
    color: white;
    border: none;
    padding: 18px 22px;
    cursor: pointer;
    font-size: 20px;
    border-radius: 50%;
    transition: all 0.3s ease;
    user-select: none;
    z-index: 10002;
}

.gallery-nav:hover {
    background-color: rgba(74, 124, 89, 1);
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav.prev {
    left: 30px;
}

.gallery-nav.next {
    right: 30px;
}

/* Close button */
.gallery-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    z-index: 10001;
    transition: opacity 0.3s ease;
}

.gallery-close:hover {
    opacity: 0.7;
}

/* Image counter */
.image-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
}

/* Image title */
.image-title {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 16px;
    text-align: center;
    max-width: 80%;
}

/* Tablet Design (768px and up) */
@media (min-width: 768px) {
    #page {
        max-width: 1200px;
        margin: 0 auto;
        box-shadow: 0 0 10px rgba(0,0,0,0.1);
    }

    #header {
        padding: 20px 30px;
    }

    .site-logo img {
        max-width: 150px;
    }

    .site-name h1 {
        font-size: 1.8em;
    }

    .site-slogan h2 {
        font-size: 1.1em;
        margin: 5px 0 20px 0;
    }

    /* Hide burger menu on tablet/desktop */
    .menu-toggle {
        display: none;
    }

    /* Horizontal navigation on tablet/desktop */
    #primary-menu ul.menu {
        display: flex !important;
        flex-direction: row;
        justify-content: center;
        position: static;
        box-shadow: none;
        border-radius: 5px;
    }

    #primary-menu ul.menu li {
        border-right: 1px solid #5a8c69;
        border-bottom: none;
    }

    #primary-menu ul.menu li:last-child {
        border-right: none;
    }

    #primary-menu ul.menu li a {
        padding: 12px 20px;
        font-size: 14px;
    }

    /* Two-column layout for tablet/desktop */
    #content {
        flex-direction: row;
        padding: 20px 30px;
        gap: 30px;
        max-width: 1200px;
        margin: 0 auto;
    }

    #leftcolumn {
        order: 1;
        flex: 2;
    }

    #sidebar {
        order: 2;
        flex: 1;
        padding: 20px;
    }

    .block {
        padding: 20px;
        margin-bottom: 20px;
    }

    .block h1 {
        font-size: 1.6em;
    }

    .block h2 {
        font-size: 1.4em;
    }

    .block h3 {
        font-size: 1.3em;
    }

    /* Photo gallery larger on tablet */
    .photo-gallery div {
        gap: 15px;
        padding: 15px 0;
    }

    .photo-gallery img {
        width: 300px;
        height: 225px;
    }
}

/* Desktop Design (1024px and up) */
@media (min-width: 1024px) {
    .site-name h1 {
        font-size: 2em;
    }

    .site-slogan h2 {
        font-size: 1.2em;
    }

    .block h1 {
        font-size: 1.8em;
    }

    .block h2 {
        font-size: 1.5em;
    }

    .block h3 {
        font-size: 1.4em;
    }

    /* Larger photo gallery on desktop */
    .photo-gallery img {
        width: 350px;
        height: 262px;
    }

    /* Better modal on larger screens */
    .gallery-nav {
        padding: 18px 22px;
        font-size: 20px;
    }
    
    .gallery-nav.prev {
        left: 30px;
    }
    
    .gallery-nav.next {
        right: 30px;
    }
    
    .gallery-close {
        top: 20px;
        right: 30px;
        font-size: 40px;
    }
}

/* Table responsiveness for mobile */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
    overflow-x: auto;
    display: block;
    white-space: nowrap;
}

table thead {
    display: table-header-group;
}

table tbody {
    display: table-row-group;
}

table th, table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    min-width: 80px;
}

table th {
    background-color: #4a7c59;
    color: white;
    font-weight: bold;
}

table tr:hover {
    background-color: #f5f5f5;
}

/* Mobile table wrapper for horizontal scroll */
.table-wrapper {
    overflow-x: auto;
    margin: 20px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* Contact info mobile optimization */
.contact-info strong {
    color: #2c5234;
    font-size: 1.1em;
    display: block;
    margin-bottom: 8px;
}

.contact-info a {
    font-size: 16px;
    padding: 8px 0;
    display: block;
}

/* Mobile form improvements */
input, textarea, select {
    font-size: 16px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
}

/* Prevent zoom on iOS */
input[type="text"], 
input[type="email"], 
input[type="tel"], 
textarea {
    font-size: 16px;
}
