/* assets/style.css */

/* Zmienne CSS oparte na kolorystyce z logo Sportingu */
:root {
    --primary-color: #001b48; /* Głęboki granat z logo */
    --secondary-color: #c29a4b; /* Złoty/musztardowy z logo */
    --accent-color: #d8b05e; 
    --bg-color: #ffffff;
    --bg-light: #f4f7f6;
    --text-main: #333333;
    --text-light: #666666;
    --border-color: #e0e0e0;
}

/* Reset i podstawowe style */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    font-size: 18px;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* --- NAGŁÓWEK I NAWIGACJA --- */
header {
    background-color: #ffffff;
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo-img {
    max-height: 60px;
    width: auto;
    display: block;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

nav ul li a {
    color: var(--primary-color);
    font-weight: bold;
    padding: 10px 15px;
    text-transform: uppercase;
    font-size: 0.9em;
    position: relative;
}

/* Animacja podkreślenia w menu */
nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 0;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

nav ul li a:hover {
    color: var(--secondary-color);
}

/* --- SEKCJA HERO --- */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #003366 100%);
    color: white;
    text-align: center;
    padding: 100px 20px;
    margin-bottom: 60px;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
}

.hero h1 {
    font-size: 3.5em;
    font-weight: 900;
    margin-bottom: 20px;
    text-transform: uppercase;
    animation: slideInDown 0.8s ease-out;
}

.hero p {
    font-size: 1.4em;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeIn 1.2s ease-out;
}

/* --- PRZYCISKI --- */
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 15px 35px;
    background-color: var(--secondary-color);
    color: white !important;
    text-transform: uppercase;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.2);
    text-align: center;
    margin: 5px;
}

.btn:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 6px 6px 0px rgba(0,0,0,0.2);
}

.btn-outline {
    background-color: transparent;
    color: white !important;
    border: 2px solid white;
    box-shadow: none;
}

.btn-outline:hover {
    background-color: white;
    color: var(--primary-color) !important;
    box-shadow: none;
    transform: translateY(0);
}

/* --- OGÓLNE SEKCJE --- */
section {
    margin-bottom: 80px;
}

h2.section-title {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 40px;
    color: var(--primary-color);
    text-transform: uppercase;
    position: relative;
    padding-bottom: 15px;
}

h2.section-title::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 4px;
    background-color: var(--secondary-color);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* --- KARTY (KAFELKI) --- */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.block-item {
    background: var(--bg-light);
    padding: 30px 20px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 5px solid var(--primary-color);
    border-radius: 0; 
}

.block-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-left-color: var(--secondary-color);
}

.block-item h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.4em;
}

.project-card {
    background: white;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    border-radius: 0;
}

.project-card:hover {
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
    transform: scale(1.02);
}

.project-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 0;
}

.project-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-content h3 {
    margin-top: 15px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.project-content p {
    color: var(--text-light);
    flex-grow: 1;
}

.project-content .btn {
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 0.9em;
}

/* --- STATUSY PROJEKTÓW --- */
.status-badge {
    display: inline-block;
    padding: 5px 12px;
    font-weight: bold;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 1px;
    align-self: flex-start;
    border-radius: 0;
}

.status-planowany { background-color: #e0f7fa; color: #006064; border-left: 4px solid #00acc1; }
.status-nabor { background-color: #e8f5e9; color: #1b5e20; border-left: 4px solid #4caf50; }
.status-realizacja { background-color: #fff8e1; color: #f57f17; border-left: 4px solid #ffb300; }
.status-zakonczony { background-color: #f5f5f5; color: #424242; border-left: 4px solid #9e9e9e; }

/* --- WSPÓŁPRACA --- */
.partners-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 40px;
}
.partners-grid img {
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
    max-height: 80px;
}
.partners-grid img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* --- PODSTRONA PROJEKTU --- */
.project-header {
    background-color: var(--primary-color);
    color: white;
    padding: 60px 20px;
    text-align: center;
    margin-bottom: 40px;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
}

.project-header h1 {
    font-size: 2.8em;
    margin-top: 20px;
    text-transform: uppercase;
}

.project-section {
    background: var(--bg-light);
    padding: 35px;
    margin-bottom: 30px;
    border-left: 5px solid var(--secondary-color);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border-radius: 0;
}

.project-section h2 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-size: 1.5em;
}

.project-image-main {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    margin-bottom: 40px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* --- STOPKA --- */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 60px 20px 30px;
    margin-top: 80px;
    border-top: 5px solid var(--secondary-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-contact h3, .footer-links h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
    text-transform: uppercase;
}

.footer-links a {
    color: #cccccc;
    display: block;
    margin-bottom: 10px;
}

.footer-links a:hover {
    color: var(--secondary-color);
}

.footer-copyright {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9em;
    color: #aaaaaa;
}

.footer-copyright strong {
    color: var(--secondary-color);
}

/* --- ANIMACJE (Keyframes) --- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ==================================================
   RESPONSYWNOŚĆ I MENU ROZWIJANE (Telefony i Tablety)
   ================================================== */

/* Domyślnie ukrywamy przycisk hamburgera na dużych ekranach */
.menu-toggle {
    display: none; 
    flex-direction: column;
    justify-content: space-between;
    width: 35px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001; /* Zawsze nad menu */
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 4px;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* TABLETY I TELEFONY (ekrany o szerokości do 768px) */
@media screen and (max-width: 768px) {
    /* Pokazujemy przycisk hamburgera */
    .menu-toggle {
        display: flex; 
    }

    /* Układ nagłówka - logo po lewej, hamburger po prawej */
    .nav-wrapper {
        position: relative;
        flex-direction: row;
        justify-content: space-between;
    }

    /* Ukrywamy domyślnie menu i formatujemy je jako rozwijaną listę */
    nav#main-nav {
        display: none; 
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #ffffff;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        padding-bottom: 10px;
        z-index: 1000;
        border-top: 2px solid var(--primary-color);
    }

    /* Klasa dodawana przez JavaScript - pokazuje menu */
    nav#main-nav.active {
        display: block; 
    }

    nav ul {
        flex-direction: column;
        gap: 0;
        padding: 0;
    }

    nav ul li {
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
        text-align: center;
    }
    
    nav ul li:last-child {
        border-bottom: none;
    }

    nav ul li a {
        display: block;
        padding: 15px 0;
        font-size: 1.1em;
    }

    /* Animacja przycisku hamburgera (zamiana w 'X') */
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(10px) rotate(45deg);
    }
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-10px) rotate(-45deg);
    }

    /* Poprawki rozmiarów na mniejszych ekranach */
    .hero { padding: 60px 20px; }
    .hero h1 { font-size: 2.2em; }
    h2.section-title { font-size: 2.2em; }
    .project-header h1 { font-size: 2.2em; }
    .footer-content { flex-direction: column; text-align: center; }
}

/* TYLKO TELEFONY (drobne korekty dla ekranów poniżej 480px) */
@media screen and (max-width: 480px) {
    body { font-size: 16px; }
    .logo-img { max-height: 45px; }
    .hero { padding: 50px 15px; clip-path: polygon(0 0, 100% 0, 100% 95%, 0 100%); }
    .hero h1 { font-size: 1.8em; }
    .hero p { font-size: 1em; }
    h2.section-title { font-size: 1.8em; }
    .grid-4 { grid-template-columns: 1fr; }
    .btn { width: 100%; box-sizing: border-box; margin: 5px 0 10px 0; }
}