/*
Theme Name: Toporec Farm Theme
Theme URI: https://toporec.sk
Description: Custom WordPress theme for Toporec Farm with Elementor support - ORIGINÁLNE FARBY Z HTML
Author: BAJAN IT
Author URI: https://bajan.sk
Version: 1.0.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: toporec
Tags: farm, agriculture, organic, business, elementor
*/

/* ============================================
   TOPOREC - Premium Farm Website Styles
   Farby podľa loga - ORIGINÁL Z HTML
   ============================================ */

/* CSS Variables - FARBY Z PÔVODNÉHO HTML */
:root {
    --primary-blue: #1e3a8a;
    --secondary-blue: #3b82f6;
    --light-blue: #60a5fa;
    --accent-blue: #93c5fd;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --bg-cream: #f8fafc;
    --bg-light: #f1f5f9;
    --shadow-sm: 0 2px 12px rgba(30, 58, 138, 0.08);
    --shadow-md: 0 8px 30px rgba(30, 58, 138, 0.12);
    --shadow-lg: 0 20px 60px rgba(30, 58, 138, 0.15);
    --shadow-xl: 0 30px 80px rgba(30, 58, 138, 0.2);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 20px;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: #ffffff;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Main content area - margin-top pre stránky s fixným headerom (nie Elementor) */
body:not(.home):not(.page-template-page-elementor) .site-main,
body:not(.home):not(.page-template-page-elementor) main,
body.woocommerce-page .site-main,
body.woocommerce-page main {
    margin-top: 90px;
    min-height: calc(100vh - 90px);
}

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

/* ============================================
   STICKY HEADER & NAVIGATION - PRESNE AKO V HTML
   ============================================ */

.header,
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(30, 58, 138, 0.1);
}

.header.scrolled,
.site-header.scrolled {
    box-shadow: 0 4px 30px rgba(30, 58, 138, 0.15);
    background: rgba(255, 255, 255, 1);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    transition: padding 0.4s ease;
}

.header.scrolled .nav,
.site-header.scrolled .nav {
    padding: 0.7rem 2rem;
}

/* Logo */
.nav-brand,
.site-branding {
    display: flex;
    align-items: center;
    z-index: 1001;
}

/* Navigation Right Side - Menu + Search + Hamburger */
.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Logo - PHP header */
.nav-brand .custom-logo-link img,
.nav-brand .custom-logo,
.nav .logo,
img.custom-logo {
    height: 65px !important;
    max-height: 65px !important;
    width: auto !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

.header.scrolled .nav-brand .custom-logo-link img,
.header.scrolled .nav-brand .custom-logo,
.header.scrolled .nav .logo,
.header.scrolled img.custom-logo {
    height: 50px !important;
    max-height: 50px !important;
}

/* Navigation Menu */
.nav-menu,
#primary-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-menu li,
#primary-menu li {
    margin: 0;
}

.nav-link,
.nav-menu a,
#primary-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    transition: var(--transition);
    padding: 0.8rem 1.5rem;
    display: block;
    border-radius: 50px;
    background: transparent;
}

.nav-link::before,
.nav-menu a::before,
#primary-menu a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(59, 130, 246, 0.08);
    border-radius: 50px;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link::after,
.nav-menu a::after,
#primary-menu a::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue), var(--light-blue));
    border-radius: 3px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover::before,
.nav-menu a:hover::before,
#primary-menu a:hover::before {
    opacity: 1;
    transform: scale(1);
}

.nav-link:hover,
.nav-menu a:hover,
#primary-menu a:hover {
    color: var(--primary-blue);
}

.nav-link:hover::after,
.nav-menu a:hover::after,
#primary-menu a:hover::after {
    width: 60%;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle,
#mobileMenuToggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer !important;
    padding: 0;
    z-index: 1003 !important;
    position: relative;
    transition: var(--transition);
    pointer-events: auto !important;
}

.mobile-menu-toggle span,
.mobile-menu-toggle .menu-icon::before,
.mobile-menu-toggle .menu-icon::after {
    width: 100%;
    height: 3px;
    background: var(--primary-blue);
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
    display: block;
}

/* ============================================
   BUTTONS - PRESNE AKO V HTML
   ============================================ */

.btn {
    display: inline-block;
    padding: 1.1rem 2.5rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    box-shadow: 0 8px 25px rgba(30, 58, 138, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(30, 58, 138, 0.4);
    color: white;
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-blue);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
}

/* ============================================
   SECTION TITLES
   ============================================ */

.section-title {
    font-size: 3rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--primary-blue);
    letter-spacing: -1px;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--light-blue), var(--primary-blue));
    border-radius: 2px;
}

/* ============================================
   WORDPRESS & ELEMENTOR COMPATIBILITY
   ============================================ */

/* WordPress image alignment */
.alignnone {
    margin: 1.5em 1.5em 1.5em 0;
}

.aligncenter,
div.aligncenter {
    display: block;
    margin: 1.5em auto;
}

.alignright {
    float: right;
    margin: 0.5em 0 1.5em 1.5em;
}

.alignleft {
    float: left;
    margin: 0.5em 1.5em 1.5em 0;
}

/* Elementor compatibility */
.elementor-widget-wrap {
    position: relative;
}

.elementor-section {
    position: relative;
}

.elementor-button {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue)) !important;
    color: white !important;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    box-shadow: 0 8px 25px rgba(30, 58, 138, 0.3);
}

.elementor-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(30, 58, 138, 0.4);
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--light-blue);
    border-radius: 6px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-blue);
}

/* ============================================
   SELECTION STYLE
   ============================================ */

::selection {
    background: var(--light-blue);
    color: white;
}

::-moz-selection {
    background: var(--light-blue);
    color: white;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 968px) {
    .nav-right {
        gap: 0.5rem;
    }

    .mobile-menu-toggle,
    #mobileMenuToggle {
        display: flex !important;
        position: relative;
        z-index: 1003 !important;
        pointer-events: auto !important;
    }

    .nav-menu,
    #primary-menu,
    .main-navigation {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        gap: 1rem;
        padding: 2rem 1.5rem;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
    }

    .nav-menu.active,
    #primary-menu.active,
    .main-navigation.active {
        right: 0;
    }
    
    .nav-link,
    .nav-menu a,
    #primary-menu a {
        font-size: 1rem;
        padding: 0.7rem 0;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .logo,
    .custom-logo {
        height: 45px;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .logo,
    .custom-logo {
        height: 40px;
    }
    
    .btn {
        padding: 1rem 2rem;
        font-size: 0.95rem;
    }
}

/* WordPress admin bar fix */
body.admin-bar .site-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
}

/* ============================================
   FOOTER STYLES
   ============================================ */

.footer {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #0f2557 100%);
    color: white;
    padding: 0;
    margin-top: 0;
    position: relative;
    overflow: hidden;
}

.footer-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 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");
    pointer-events: none;
}

.footer .container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem 0;
}

.footer-main {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.footer-brand > p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.footer-contact p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.footer-contact strong {
    color: white;
}

.footer-links h4,
.footer-hours h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: white;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links ul li {
    margin-bottom: 0.8rem;
}

.footer-links ul a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links ul a:hover {
    color: white;
    transform: translateX(5px);
}

.hours-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hours-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.hours-list li:last-child {
    border-bottom: none;
}

.footer-bottom {
    padding: 1.5rem 0;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin: 0;
}

.footer-bottom a {
    color: var(--light-blue);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: white;
}

@media (max-width: 968px) {
    .footer-main {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    .footer-main {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links ul a:hover {
        transform: none;
    }

    .hours-list li {
        flex-direction: column;
        gap: 0.3rem;
    }
}

/* ============================================
   CART ICON IN MENU
   ============================================ */

.menu-item-cart {
    position: relative;
}

.menu-item-cart .cart-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.2rem !important;
    position: relative;
}

.menu-item-cart .cart-link svg {
    stroke: var(--text-dark);
    transition: all 0.3s ease;
}

.menu-item-cart .cart-link:hover svg {
    stroke: var(--primary-blue);
}

.menu-item-cart .cart-count {
    position: absolute;
    top: 5px;
    right: 5px;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ============================================
   BLOG STYLES - ČLÁNKY
   ============================================ */

/* Blog Archive Page */
.blog-page-wrapper {
    padding-top: 100px;
    min-height: 100vh;
    background: var(--bg-cream);
}

.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.blog-header {
    text-align: center;
    padding: 2rem 0 3rem;
}

.blog-header h1 {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.blog-header h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 2px;
}

.blog-header p {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-top: 1.5rem;
}

/* Blog Posts Grid */
.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

/* Single Blog Post Card */
.blog-post-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.blog-post-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.blog-post-card .post-thumbnail {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.blog-post-card .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.blog-post-card .post-content {
    padding: 1.5rem;
}

.blog-post-card .post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

.blog-post-card .post-date {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.blog-post-card .post-category {
    background: var(--bg-light);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    color: var(--primary-blue);
    font-weight: 600;
}

.blog-post-card .post-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.blog-post-card .post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-post-card .post-title a:hover {
    color: var(--secondary-blue);
}

.blog-post-card .post-excerpt {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.blog-post-card .read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-blue);
    font-weight: 600;
    text-decoration: none;
    transition: gap 0.3s ease;
}

.blog-post-card .read-more:hover {
    gap: 0.8rem;
}

/* Single Blog Post */
.single-post-wrapper {
    padding-top: 100px;
    min-height: 100vh;
    background: var(--bg-cream);
}

.single-post-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.single-post-header {
    text-align: center;
    padding: 2rem 0;
}

.single-post-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.single-post-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.3;
    margin-bottom: 2rem;
}

.single-post-featured-image {
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.single-post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.single-post-content {
    background: white;
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.single-post-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 2rem 0 1rem;
}

.single-post-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 1.5rem 0 0.8rem;
}

.single-post-content p {
    color: var(--text-light);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.single-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    margin: 1.5rem 0;
}

.single-post-content a {
    color: var(--secondary-blue);
    text-decoration: underline;
}

.single-post-content a:hover {
    color: var(--primary-blue);
}

/* Back to Blog Link */
.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 2rem;
    transition: color 0.3s ease;
}

.back-to-blog:hover {
    color: var(--primary-blue);
}

/* Blog Responsive */
@media (max-width: 968px) {
    .blog-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .blog-header h1 {
        font-size: 2.2rem;
    }

    .single-post-title {
        font-size: 2rem;
    }

    .single-post-content {
        padding: 2rem;
    }
}

@media (max-width: 600px) {
    .blog-posts-grid {
        grid-template-columns: 1fr;
    }

    .blog-container {
        padding: 1rem;
    }

    .blog-header h1 {
        font-size: 1.8rem;
    }

    .single-post-title {
        font-size: 1.6rem;
    }

    .single-post-content {
        padding: 1.5rem;
    }

    .single-post-content h2 {
        font-size: 1.4rem;
    }
}

/* ============================================
   HEADER SEARCH FORM
   ============================================ */

.header-search {
    display: flex;
    align-items: center;
    margin-left: 1rem;
}

.search-form {
    display: flex;
    align-items: center;
    position: relative;
    background: var(--bg-cream);
    border: 2px solid transparent;
    border-radius: 50px;
    overflow: hidden;
    transition: var(--transition);
    max-width: 250px;
}

.search-form:hover,
.search-form:focus-within {
    background: #ffffff;
    border-color: var(--light-blue);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
}

.search-field {
    border: none;
    background: transparent;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    color: var(--text-dark);
    outline: none;
    width: 100%;
    font-family: inherit;
}

.search-field::placeholder {
    color: var(--text-light);
    opacity: 0.7;
}

.search-submit {
    border: none;
    background: transparent;
    padding: 0.6rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: var(--transition);
}

.search-submit:hover {
    color: var(--primary-blue);
    transform: scale(1.1);
}

.search-submit svg {
    width: 20px;
    height: 20px;
}

/* Mobile responsiveness */
@media (max-width: 1024px) {
    .header-search {
        display: none !important;
        pointer-events: none !important;
        visibility: hidden !important;
    }

    /* Mobile search - lahko sa doplní popup variant */
}
