/* MTB Põhistiilid */
:root {
    --primary-color: #1a5490;
    --secondary-color: #2d7db8;
    --accent-color: #4a9eff;
    --text-color: #2c3e50;
    --bg-color: #ffffff;
}

* {
    box-sizing: border-box;
}

.mtb-page-wrapper {
    width: 100%;
}

.mtb-layout-boxed {
    max-width: 1200px;
    margin: 0 auto;
}

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

/* Hero sektsioon */
.mtb-hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 100px 20px;
    text-align: center;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mtb-hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.mtb-hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.mtb-hero-buttons {
    margin-top: 2rem;
}

.mtb-btn {
    display: inline-block;
    padding: 15px 30px;
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    margin: 0 10px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.mtb-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    color: white;
    text-decoration: none;
}

.mtb-btn-secondary {
    background: transparent;
    border: 2px solid white;
}

.mtb-btn-secondary:hover {
    background: white;
    color: var(--primary-color);
}

/* Üldised sektsioonid */
.mtb-section {
    padding: 80px 0;
}

.mtb-section h2 {
    text-align: center;
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 3rem;
    font-weight: bold;
}

/* Uudised */
.mtb-news {
    background: #f8f9fa;
}

.mtb-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.mtb-news-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.mtb-news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.mtb-news-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.mtb-news-content {
    padding: 20px;
}

.mtb-news-content h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.mtb-news-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.mtb-read-more {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
}

.mtb-read-more:hover {
    text-decoration: underline;
}

/* Teenused */
.mtb-services {
    background: white;
}

.mtb-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.mtb-service-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.mtb-service-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.mtb-service-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.mtb-service-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.mtb-service-card p {
    color: #666;
    line-height: 1.6;
}

/* Statistika */
.mtb-statistics {
    background: var(--primary-color);
    color: white;
}

.mtb-statistics h2 {
    color: white;
}

.mtb-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}

.mtb-stat-item {
    padding: 20px;
}

.mtb-stat-number {
    font-size: 3rem;
    font-weight: bold;
    color: var(--accent-color);
    display: block;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.mtb-stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Responsiivsus */
@media (max-width: 768px) {
    .mtb-hero-content h1 {
        font-size: 2rem;
    }
    
    .mtb-section {
        padding: 40px 0;
    }
    
    .mtb-section h2 {
        font-size: 2rem;
    }
    
    .mtb-btn {
        display: block;
        margin: 10px auto;
        max-width: 200px;
    }
    
    .mtb-news-grid,
    .mtb-services-grid {
        grid-template-columns: 1fr;
    }
    
    .mtb-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .mtb-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .mtb-container {
        padding: 0 15px;
    }
}

/* Mooduli setting-spetsiifilised stiilid */

/* Hero nuppude stiilid */
.mtb-buttons-square .mtb-btn {
    border-radius: 4px;
}

.mtb-buttons-minimal .mtb-btn {
    background: transparent;
    border: 2px solid currentColor;
}

.mtb-buttons-minimal .mtb-btn-primary {
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.mtb-buttons-minimal .mtb-btn-primary:hover {
    background: var(--accent-color);
    color: white;
}

/* Hero overlay */
.mtb-hero {
    position: relative;
}

.mtb-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.5), rgba(0,0,0,0.3));
    z-index: 1;
}

.mtb-hero-content {
    position: relative;
    z-index: 2;
}

/* Teenused - veergude arv */
.mtb-services-grid.mtb-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.mtb-services-grid.mtb-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.mtb-services-grid.mtb-columns-6 {
    grid-template-columns: repeat(6, 1fr);
}

/* Teenused - stiilid */
.mtb-services-classic .mtb-service-card {
    border: 2px solid #ddd;
    box-shadow: none;
}

.mtb-services-minimal .mtb-service-card {
    background: transparent;
    box-shadow: none;
    border: 1px solid #eee;
}

/* Uudised - featured sidebar layout */
.mtb-news-featured-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.mtb-news-featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.mtb-news-featured .mtb-news-image {
    height: 250px;
}

.mtb-news-featured .mtb-news-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mtb-news-featured h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.mtb-news-sidebar {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    height: fit-content;
}

.mtb-news-sidebar h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.mtb-alerts {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mtb-alert {
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid;
}

.mtb-alert-warning {
    background: #fff3cd;
    border-left-color: #ffc107;
    color: #856404;
}

.mtb-alert-info {
    background: #d1ecf1;
    border-left-color: #17a2b8;
    color: #0c5460;
}

.mtb-alert-success {
    background: #d4edda;
    border-left-color: #28a745;
    color: #155724;
}

/* Statistika taustarvid */
.mtb-stats-bg-secondary {
    background: var(--secondary-color);
}

.mtb-stats-bg-dark {
    background: var(--text-color);
}

/* Statistika veerud */
.mtb-stats-grid.mtb-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.mtb-stats-grid.mtb-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.mtb-stats-grid.mtb-columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

/* Kontakt */
.mtb-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.mtb-contact-item {
    margin-bottom: 20px;
}

.mtb-contact-item strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 5px;
}

.mtb-contact-form {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
}

.mtb-contact-form input,
.mtb-contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 15px;
    font-family: inherit;
}

.mtb-contact-form input:focus,
.mtb-contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Responsive täiendused */
@media (max-width: 768px) {
    .mtb-news-featured-layout {
        grid-template-columns: 1fr;
    }
    
    .mtb-news-featured {
        grid-template-columns: 1fr;
    }
    
    .mtb-news-featured .mtb-news-image {
        height: 200px;
    }
    
    .mtb-contact-grid {
        grid-template-columns: 1fr;
    }
    
    .mtb-services-grid[class*="mtb-columns-"] {
        grid-template-columns: 1fr !important;
    }
    
    .mtb-stats-grid[class*="mtb-columns-"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .mtb-stats-grid[class*="mtb-columns-"] {
        grid-template-columns: 1fr !important;
    }
}

/* MTB Header Styles */
.mtb-header {
    position: relative;
    z-index: 1000;
    background: var(--header-bg, #ffffff);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.mtb-header-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    transition: all 0.3s ease;
}

.mtb-header-scrolled {
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

/* Utilities bar */
.mtb-utilities-bar {
    background: var(--utilities-bg, #1a5490);
    color: white;
    font-size: 0.9rem;
    padding: 8px 0;
}

.mtb-utilities-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mtb-contact-quick {
    display: flex;
    gap: 20px;
}

.mtb-contact-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.mtb-contact-item a {
    color: white;
    text-decoration: none;
}

.mtb-contact-item a:hover {
    text-decoration: underline;
}

.mtb-utility-links {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mtb-utility-link {
    color: white;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 3px;
    transition: background 0.3s ease;
}

.mtb-utility-link:hover {
    background: rgba(255,255,255,0.1);
    text-decoration: none;
}

.mtb-language-switcher {
    display: flex;
    gap: 5px;
}

.mtb-lang-link {
    color: white;
    text-decoration: none;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: bold;
}

.mtb-lang-link.active {
    background: rgba(255,255,255,0.2);
}

.mtb-search-toggle {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
    transition: background 0.3s ease;
}

.mtb-search-toggle:hover {
    background: rgba(255,255,255,0.1);
}

/* Main header */
.mtb-main-header {
    padding: 15px 0;
}

.mtb-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.mtb-logo-link {
    text-decoration: none;
    color: var(--header-text, #2c3e50);
}

.mtb-logo-text {
    font-size: var(--logo-size, 2rem);
    font-weight: bold;
    color: var(--primary-color, #1a5490);
}

.mtb-logo-image {
    max-height: 60px;
    width: auto;
}

/* Navigation */
.mtb-nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}

.mtb-nav-menu a {
    color: var(--header-text, #2c3e50);
    text-decoration: none;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
}

.mtb-nav-menu a:hover {
    color: var(--primary-color, #1a5490);
    background: rgba(26, 84, 144, 0.1);
}

/* Dropdown menu */
.mtb-nav-menu li {
    position: relative;
}

.mtb-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    border-radius: 5px;
    padding: 10px 0;
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.mtb-dropdown-menu.mtb-dropdown-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mtb-dropdown-menu a {
    padding: 8px 20px;
    display: block;
    border-radius: 0;
}

.mtb-dropdown-menu a:hover {
    background: #f8f9fa;
}

.mtb-dropdown-icon {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.mtb-dropdown-open .mtb-dropdown-icon {
    transform: rotate(180deg);
}

/* Mobile toggle */
.mtb-mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    flex-direction: column;
    gap: 4px;
}

.mtb-hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--header-text, #2c3e50);
    border-radius: 2px;
    transition: all 0.3s ease;
}

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

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

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

/* Search overlay */
.mtb-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mtb-search-overlay.mtb-search-active {
    opacity: 1;
    visibility: visible;
}

.mtb-search-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    padding: 0 20px;
}

.mtb-search-form {
    display: flex;
    background: white;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.mtb-search-input {
    flex: 1;
    border: none;
    padding: 20px 30px;
    font-size: 1.2rem;
    outline: none;
}

.mtb-search-submit {
    background: var(--primary-color, #1a5490);
    border: none;
    padding: 20px 30px;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
}

.mtb-search-close {
    position: absolute;
    top: -60px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    .mtb-utilities-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .mtb-contact-quick {
        flex-direction: column;
        gap: 10px;
    }
    
    .mtb-mobile-toggle {
        display: flex;
    }
    
    .mtb-main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 5px 15px rgba(0,0,0,0.15);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all 0.3s ease;
    }
    
    .mtb-nav-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .mtb-nav-menu {
        flex-direction: column;
        gap: 0;
        padding: 20px;
    }
    
    .mtb-nav-menu a {
        padding: 15px 0;
        border-bottom: 1px solid #eee;
    }
    
    .mtb-dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: #f8f9fa;
        margin: 10px 0;
    }
    
    body.mtb-nav-open {
        overflow: hidden;
    }
}

/* Header body spacing */
body {
    padding-top: 0;
}

body .mtb-header-sticky ~ * {
    padding-top: 120px; /* Adjust based on header height */
}

@media (max-width: 768px) {
    body .mtb-header-sticky ~ * {
        padding-top: 140px;
    }
}