/**
 * @package     Joomla.Site
 * @subpackage  mod_sponsors
 *
 * @copyright   Copyright (C) 2025 TeleOptimum Kft. All rights reserved.
 * @license     GNU General Public License version 2 or later
 */

:root {
    /* Alap színek */
    --background-main: #ffffff;
    --background-secondary: #f9f9f9;
    --shadow-color: rgba(0, 0, 0, 0.05);
    --border-radius-main: 8px;
    --border-radius-inner: 6px;

    --text-primary: #333333;
    --text-secondary: #666666;
    --link-color: #2b669a;
    --link-hover: underline;

    /* Kategória színek */
    --platinum-bg: #e5e4e2;
    --gold-bg: #FFD700;
    --silver-bg: #C0C0C0;
    --bronze-bg: #CD7F32;
    --default-bg: #17a2b8;

    /* Navigációs gomb színek */
    --nav-bg: rgba(0, 0, 0, 0.2);
    --nav-bg-hover: rgba(0, 0, 0, 0.4);

    /* Transition idők */
    --transition-fast: 0.3s;
    --transition-medium: 0.5s;

    /* Méretek */
    --container-margin: 1.25rem;
    --container-padding: 1rem;
    --logo-margin-bottom: 1rem;
}

/* Alap konténer */
.sponsors-simple-carousel {
    margin: var(--container-margin) 0;
    padding: var(--container-padding);
    background: var(--background-main);
    border-radius: var(--border-radius-main);
    box-shadow: 0 2px 10px var(--shadow-color);
    overflow: hidden;
    max-width: 100%; /* Megakadályozza a túlcsordulást */
}

/* Karusszel fő konténer */
.sponsor-slider {
    position: relative;
    margin: 0 auto;
    background: var(--background-secondary);
    border-radius: var(--border-radius-inner);
    padding: var(--container-padding);
    overflow: hidden;
    width: 100%; /* Teljes szélesség */
}

/* Slide konténer */
.slides-container {
    position: relative;
    min-height: 9.375rem; /* 150px */
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Slide */
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity var(--transition-medium) ease;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 0;
    transform: translateX(0); /* Kijavítja a mobil elcsúszást */
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

/* Slide tartalom */
.slide-content {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 2.5rem; /* Extra padding a nyilak miatt */
    box-sizing: border-box; /* Biztosítja, hogy a padding belül maradjon */
}

/* Szponzor logó */
.sponsor-logo {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: var(--logo-margin-bottom);
    max-height: calc(var(--logo-height, 150px) + 20px); /* Dinamikus magasság */
}

.logo-image {
    max-width: var(--logo-width, 150px) !important; /* Felülbírálja az inline stílusokat */
    max-height: var(--logo-height, 150px) !important;
    height: auto;
    object-fit: contain;
    transition: transform var(--transition-fast) ease;
    display: block;
}

.logo-image:hover {
    transform: scale(1.05);
}

/* Szponzor név */
.sponsor-name {
    font-size: 1.125rem; /* 18px */
    font-weight: bold;
    margin: 0.3125rem 0;
    color: var(--text-primary);
    text-align: center;
    width: 100%;
}

.sponsor-name a {
    color: var(--link-color);
    text-decoration: none;
}

.sponsor-name a:hover {
    text-decoration: var(--link-hover);
}

/* Leírás */
.sponsor-description {
    font-size: 0.875rem; /* 14px */
    color: var(--text-secondary);
    margin: 0.3125rem 0 0.625rem;
    line-height: 1.4;
    text-align: center;
    width: 100%;
}

/* Kategória címkék */
.sponsor-category {
    margin-top: 0.3125rem;
    text-align: center;
    width: 100%;
}

.category-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    color: #fff;
    font-size: 0.75rem;
    border-radius: 25px;
}

.category-platinum {
    background-color: var(--platinum-bg);
    color: var(--text-primary);
}

.category-gold {
    background-color: var(--gold-bg);
    color: var(--text-primary);
}

.category-silver {
    background-color: var(--silver-bg);
    color: var(--text-primary);
}

.category-bronze {
    background-color: var(--bronze-bg);
    color: #fff;
}

.category-default {
    background-color: var(--default-bg);
    color: #fff;
}

/* Navigációs gombok */
.nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2rem; /* 32px */
    height: 2rem;
    border-radius: 50%;
    background-color: var(--nav-bg);
    color: #fff;
    border: none;
    font-size: 0.875rem; /* 14px */
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-fast);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.prev-button {
    left: 0.625rem; /* 10px */
}

.next-button {
    right: 0.625rem;
}

.nav-button:hover {
    background-color: var(--nav-bg-hover);
}

/* Pontok */
.slider-dots {
    display: flex;
    justify-content: center;
    margin-top: 0.625rem;
    position: relative;
    z-index: 5;
    padding: 0.5rem 0; /* Extra padding */
}

.dot {
    width: 0.625rem; /* 10px */
    height: 0.625rem;
    border-radius: 50%;
    background-color: var(--nav-bg);
    margin: 0 0.3125rem;
    padding: 0;
    border: none;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.dot.active {
    background-color: var(--nav-bg-hover);
}

/* Reszponzív */
@media (max-width: 768px) {
    .sponsor-slider {
        padding: 0.625rem;
    }

    .slides-container {
        min-height: 7.5rem; /* 120px */
    }
    
    .slide-content {
        padding: 0 2rem; /* Csökkentett padding */
    }

    .sponsor-logo {
        max-height: calc(var(--logo-height, 120px) * 0.8 + 10px);
    }

    .logo-image {
        max-width: calc(var(--logo-width, 150px) * 0.8) !important;
        max-height: calc(var(--logo-height, 150px) * 0.8) !important;
    }

    .sponsor-name {
        font-size: 1rem;
    }

    .sponsor-description {
        font-size: 0.8125rem;
    }

    .nav-button {
        width: 1.75rem; /* 28px */
        height: 1.75rem;
        font-size: 0.75rem; /* 12px */
    }

    .prev-button {
        left: 0.375rem; /* 6px */
    }

    .next-button {
        right: 0.375rem;
    }
}

@media (max-width: 480px) {
    .slide-content {
        padding: 0 1.75rem; /* Kisebb padding */
    }

    .slides-container {
        min-height: 6.25rem; /* 100px */
    }

    .sponsor-logo {
        margin-bottom: 0.625rem;
        max-height: calc(var(--logo-height, 100px) * 0.7 + 5px);
    }
    
    .logo-image {
        max-width: calc(var(--logo-width, 150px) * 0.7) !important;
        max-height: calc(var(--logo-height, 150px) * 0.7) !important;
    }

    .sponsor-description {
        display: none;
    }
    
    .nav-button {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.7rem;
    }
}