
/* =========================================
   1. CSS Reset & Base Styles
   ========================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Color Palette */
    --color-primary: #1a2c4e;     /* Deep Blue */
    --color-secondary: #2979ff;   /* Bright Blue */
    --color-accent: #00e676;      /* Success/Action Green */
    --color-bg-body: #f4f7fa;     /* Light Grayish Blue */
    --color-bg-card: #ffffff;     /* White */
    --color-text-main: #333333;
    --color-text-light: #667788;
    --color-border: #e1e4e8;
    
    /* Typography */
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --font-size-base: 16px;
    --line-height: 1.6;
    
    /* Spacing & Layout */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --container-width: 1200px;
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    
    /* Effects */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

html {
    scroll-behavior: smooth;
    font-size: var(--font-size-base);
}

body {
    font-family: var(--font-family);
    background-color: var(--color-bg-body);
    color: var(--color-text-main);
    line-height: var(--line-height);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: var(--color-secondary);
    transition: var(--transition);
}

a:hover {
    color: var(--color-primary);
}

ul {
    list-style: none;
}

/* =========================================
   2. Layout Structure
   ========================================= */
.wrapper {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
    display: flex;
    flex-direction: column;
    flex: 1;
}

.main-box {
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px; /* Sidebar fixed width */
    gap: var(--spacing-md);
    align-items: start;
}

/* =========================================
   3. Header Styling
   ========================================= */
.header {
    background-color: var(--color-bg-card);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: var(--spacing-sm) 0;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.header .wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.logo {
    max-height: 50px;
    width: auto;
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05);
}

.m-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--spacing-xs);
    flex: 1;
}

/* Search Form */
.search-form form {
    display: flex;
    position: relative;
    width: 100%;
    max-width: 300px;
}

.search-form__field {
    width: 100%;
    padding: 0.6rem 1rem;
    padding-right: 2.5rem;
    border: 2px solid var(--color-border);
    border-radius: 2rem;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
    background: var(--color-bg-body);
}

.search-form__field:focus {
    border-color: var(--color-secondary);
    background: var(--color-bg-card);
    box-shadow: 0 0 0 4px rgba(41, 121, 255, 0.1);
}

.search-form__button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    background: var(--color-secondary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white' width='18px' height='18px'%3E%3Cpath d='M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E") no-repeat center;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.search-form__button:hover {
    background-color: var(--color-primary);
    transform: translateY(-50%) scale(1.1);
}

/* Navigation */
.main-menu__inner {
    margin-top: var(--spacing-xs);
}

.main-menu__list {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.main-menu__list_m {
    display: none; /* Hide mobile duplicate by default on desktop */
}

.main-menu__list li a {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    padding-bottom: 2px;
}

.main-menu__list li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--color-secondary);
    transition: var(--transition);
}

.main-menu__list li a:hover {
    color: var(--color-secondary);
}

.main-menu__list li a:hover::after {
    width: 100%;
}

/* =========================================
   4. Main Content Styling
   ========================================= */
.content {
    background: var(--color-bg-card);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Typography in Content */
.single__title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
}

.entry h2 {
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    color: var(--color-primary);
    margin: var(--spacing-md) 0 var(--spacing-sm);
    position: relative;
    display: inline-block;
}

.entry p {
    margin-bottom: 1.2rem;
    color: var(--color-text-main);
}

/* Tables */
table {
    width: 100% !important;
    max-width: 100% !important;
    border-collapse: collapse;
    margin: var(--spacing-md) 0;
    background: var(--color-bg-card);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

th {
    background: var(--color-primary);
    color: white;
    padding: 1rem;
    font-weight: 600;
    text-align: left;
    border: none !important;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--color-border) !important;
    border-left: none !important;
    border-right: none !important;
}

tr:nth-child(even) {
    background-color: #f8f9fa;
}

tr:hover {
    background-color: #e3f2fd;
    transition: background-color 0.2s ease;
}

/* Images & Captions */
.wp-caption {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 6px;
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-sm);
    text-align: center;
    max-width: 100% !important;
}

.wp-caption img {
    border-radius: var(--radius-sm);
    display: block;
    margin: 0 auto;
    width: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.content img:hover {
    transform: scale(1.01);
}

.wp-caption-text {
    padding: 0.5rem;
    font-size: 0.9rem;
    color: var(--color-text-light);
    font-style: italic;
}

/* Lists */
.entry ul, .entry ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.entry ul li {
    list-style-type: disc;
    margin-bottom: 0.5rem;
    color: var(--color-text-main);
}

.entry ol li {
    list-style-type: decimal;
    margin-bottom: 0.5rem;
}

/* =========================================
   5. Sidebar & Widgets
   ========================================= */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.widget_text {
    background: var(--color-bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border-top: 4px solid var(--color-secondary);
}

.widget_text:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.widget_text .title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--color-bg-body);
    padding-bottom: 0.5rem;
}

/* Promocode Style */
.promocode-style {
    background: #f0f7ff;
    border: 2px dashed var(--color-secondary);
    color: var(--color-primary);
    font-weight: 700;
    font-size: 1.1rem;
    padding: 1rem;
    text-align: center;
    border-radius: var(--radius-sm);
    margin-bottom: 0.8rem;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.promocode-style:hover {
    background: var(--color-secondary);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(41, 121, 255, 0.4);
}

.promocode-style::after {
    content: '📋';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
}

/* Tech Support Widget */
.widget_custom_html a[href^="tel"] {
    display: inline-block;
    color: var(--color-accent) !important;
    font-size: 1.5rem !important;
    margin: 0.5rem 0;
    transition: var(--transition);
}

.widget_custom_html a[href^="tel"]:hover {
    transform: scale(1.05);
    text-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* =========================================
   6. Footer
   ========================================= */
.footer {
    background: var(--color-primary);
    color: rgba(255, 255, 255, 0.7);
    padding: var(--spacing-md) 0;
    margin-top: auto;
}

.footer-bottom {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
    text-align: center;
    font-size: 0.85rem;
}

.copy {
    line-height: 1.8;
}

/* =========================================
   7. Responsive Design (Media Queries)
   ========================================= */
@media screen and (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr; /* Stack sidebar below content */
    }
    
    .sidebar {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: var(--spacing-sm);
    }
}

@media screen and (max-width: 768px) {
    /* Header Adjustments */
    .header .wrapper {
        flex-direction: column;
        align-items: center;
    }
    
    .m-nav {
        width: 100%;
        align-items: center;
    }
    
    .search-form form {
        max-width: 100%;
        width: 100%;
    }

    /* Navigation */
    .main-menu {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }

    .main-menu__list {
        display: none; /* Hide desktop list */
    }

    .main-menu__list_m {
        display: flex; /* Show mobile list */
        flex-wrap: nowrap;
        white-space: nowrap;
        gap: 1rem;
        padding: 0 0.5rem;
    }

    .main-menu__list_m li a {
        display: block;
        padding: 0.5rem 1rem;
        background: var(--color-bg-body);
        border-radius: 20px;
        font-size: 0.85rem;
        color: var(--color-text-main);
    }

    .main-menu__list_m li a:hover,
    .main-menu__list_m li.current-menu-item a {
        background: var(--color-secondary);
        color: white;
    }

    /* Content Adjustments */
    .content {
        padding: 1rem;
    }
    
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .single__title {
        text-align: left;
    }

    .sidebar {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   8. Utility & States
   ========================================= */
/* Focus styles for accessibility */
*:focus-visible {
    outline: 2px solid var(--color-secondary);
    outline-offset: 2px;
}

/* Buttons (Generic class based on context) */
.entry a[href*="registracia"], 
.entry a[href*="vhod"],
input[type="submit"] {
    display: inline-block;
    background: linear-gradient(135deg, var(--color-secondary) 0%, #1565c0 100%);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(41, 121, 255, 0.3);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.entry a[href*="registracia"]:hover, 
.entry a[href*="vhod"]:hover,
input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(41, 121, 255, 0.5);
    background: linear-gradient(135deg, #42a5f5 0%, var(--color-secondary) 100%);
    color: white;
    text-decoration: none;
}

.entry a[href*="registracia"]:active,
input[type="submit"]:active {
    transform: translateY(0);
}
