/* assets/css/responsive.css */
/* Responsive styles z dokładnymi wymiarami jak w HTML */

/* Extra Large screens (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-content h1 {
        font-size: 4rem;
    }
    
    .section-padding {
        padding: 100px 0;
    }
    
    .skill-card i {
        font-size: 5rem;
    }
}

/* Large screens (992px to 1399px) */
@media (min-width: 992px) and (max-width: 1399px) {
    .hero-container {
        padding: 0 15px;
    }
    
    .skills-container {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .projects-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Medium screens (768px to 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .hero {
        padding: 120px 0 80px;
    }
    
    .hero-container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-image {
        width: 100%;
        margin-bottom: 2rem;
    }
    
    .hero-content {
        width: 100%;
        padding-left: 0;
    }
    
    .hero-content h1 {
        font-size: 2.8rem;
    }
    
    .about-content, .graphics-content, .hobby-content {
        flex-direction: column;
    }
    
    .about-text, .about-skills, .graphics-text, .graphics-gallery, .hobby-text, .hobby-media {
        flex: none;
        width: 100%;
    }
    
    .skills-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .projects-container {
        grid-template-columns: 1fr;
    }
    
    .section-padding {
        padding: 60px 0;
    }
    
    .contact-container {
        flex-direction: column;
    }
    
    .contact-info, .contact-form {
        flex: none;
        width: 100%;
    }
    
    /* Galerie - 2 kolumny na tabletach */
    .graphics-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .drawing-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Small screens (576px to 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    .hero {
        padding: 100px 0 60px;
        min-height: 80vh;
    }
    
    .hero-image img {
        width: 250px;
        height: 250px;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
        margin-bottom: 1rem;
    }
    
    .tagline, .lead {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .skills-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .skill-card {
        padding: 1.5rem;
    }
    
    .skill-card i {
        font-size: 3rem;
    }
    
    .about-skills {
        grid-template-columns: 1fr;
    }
    
    .graphics-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .drawing-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Galerie zdjęć - właściwe rozmiary */
    .gallery-item img {
        height: 150px;
        object-fit: cover;
    }
}

/* Extra Small screens (up to 575px) */
@media (max-width: 575px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 80px 0 40px;
        min-height: 70vh;
    }
    
    .hero-image img {
        width: 200px;
        height: 200px;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
        line-height: 1.2;
    }
    
    .tagline, .lead {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .section-padding {
        padding: 40px 0;
    }
    
    .section-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }
    
    .section-title::after {
        width: 60px;
        height: 3px;
    }
    
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    .skill-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .skill-card i {
        font-size: 2.5rem;
        margin-bottom: 0.75rem;
    }
    
    .skill-card h3 {
        font-size: 1.1rem;
    }
    
    .about-skills {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .skill-category, .skill-category-card {
        padding: 15px;
    }
    
    /* Galerie - 1 kolumna na małych ekranach */
    .graphics-gallery, .drawing-gallery {
        grid-template-columns: 1fr;
    }
    
    /* Rozmiary obrazków w galeriach */
    .gallery-item img {
        height: 200px;
        object-fit: cover;
    }
    
    .project-card, .book-card {
        margin-bottom: 1.5rem;
    }
    
    .project-tech span {
        font-size: 0.75rem;
        padding: 3px 8px;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        margin-bottom: 1.5rem;
    }
    
    .contact-icon {
        margin: 0 auto 1rem auto;
    }
    
    .social-media {
        text-align: center;
    }
    
    .social-link, .social-icon {
        width: 45px;
        height: 45px;
        margin: 0 5px 10px 5px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
        margin-top: 2rem;
    }
    
    .radio-players {
        gap: 15px;
    }
    
    .radio-player, .audio-player {
        padding: 15px;
    }
    
    .player-controls {
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }
    
    .volume-control {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
        margin-left: 0;
    }
    
    .volume-slider {
        width: 100%;
        max-width: 200px;
    }
}

/* Landscape orientation for mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 60px 0 40px;
        min-height: 100vh;
    }
    
    .hero-container {
        flex-direction: row;
        align-items: center;
    }
    
    .hero-image {
        width: 40%;
        margin-bottom: 0;
    }
    
    .hero-image img {
        width: 150px;
        height: 150px;
    }
    
    .hero-content {
        width: 60%;
        text-align: left;
        padding-left: 2rem;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .tagline, .lead {
        font-size: 0.9rem;
    }
}

/* Responsywne rozmiary dla kart projektów i książek */
@media (max-width: 768px) {
    .projects-container, .books-container {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }
    
    .project-image, .book-cover {
        height: 250px;
    }
    
    .book-cover {
        height: 300px;
    }
}

/* Responsywne rozmiary dla skill cards */
@media (max-width: 768px) {
    .skills-container {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }
}

/* Responsywne audio players */
@media (max-width: 768px) {
    .radio-players, .singing-gallery {
        max-width: 500px;
        margin: 0 auto;
    }
}

/* Responsywne galerie */
@media (max-width: 768px) {
    .graphics-gallery, .drawing-gallery {
        max-width: 400px;
        margin: 0 auto;
    }
}

/* Responsywny kontakt */
@media (max-width: 768px) {
    .contact-form {
        max-width: 500px;
        margin: 0 auto;
    }
}

/* Print styles */
@media print {
    .navbar, .hero-buttons, .contact-form, .footer {
        display: none !important;
    }
    
    .hero {
        background: white !important;
        color: black !important;
        padding: 20px 0;
        min-height: auto;
    }
    
    .section-padding {
        padding: 20px 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
    
    a {
        color: black !important;
        text-decoration: underline;
    }
    
    .section-title {
        color: black !important;
    }
    
    .skill-card, .project-card, .book-card {
        break-inside: avoid;
        margin-bottom: 20px;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000080;
        --secondary-color: #008080;
        --text-dark: #000000;
        --bg-light: #f5f5f5;
        --light-color: #f5f5f5;
        --white-color: #ffffff;
    }
    
    .hero {
        background: linear-gradient(135deg, #000080 0%, #008080 100%);
    }
    
    .card {
        border: 2px solid #333;
    }
    
    .nav-pills .nav-link {
        border-width: 3px;
    }
    
    .btn {
        border-width: 2px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .hero::before {
        animation: none;
    }
}

/* Dark mode support - POPRAWIONE Z JASNYMI TŁAMI */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-light: #f5f5f5;          /* JASNE TŁO */
        --bg-white: #ffffff;          /* BIAŁE TŁO */
        --text-dark: #333333;         /* CIEMNY TEKST */
        --text-medium: #666666;       /* ŚREDNI TEKST */
        --light-color: #f5f5f5;       /* JASNE TŁO */
        --white-color: #ffffff;       /* BIAŁE TŁO */
        --dark-color: #333333;        /* CIEMNY TEKST */
    }
    
    body {
        background-color: #f5f5f5;    /* JASNE TŁO */
        color: #333333;               /* CIEMNY TEKST */
    }
    
    .card {
        background-color: #ffffff;    /* BIAŁE TŁO KART */
        color: #333333;               /* CIEMNY TEKST */
    }
    
    .navbar {
        background-color: #ffffff !important;  /* BIAŁE TŁO NAVBAR */
    }
    
    .section-title {
        color: #1a237e;              /* GRANATOWY TYTUŁ */
    }
    
    section:nth-child(even) {
        background-color: #ffffff !important;  /* BIAŁE TŁO SEKCJI */
    }
    
    section:nth-child(odd) {
        background-color: #f5f5f5 !important; /* JASNE TŁO SEKCJI */
    }
    
    .bg-light {
        background-color: #f5f5f5 !important; /* JASNE TŁO */
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: no-preference) {
    .card:hover, .skill-card:hover, .project-card:hover, .book-card:hover {
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
}

/* Focus styles for keyboard navigation */
.btn:focus,
.nav-link:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Improved touch targets for mobile */
@media (max-width: 768px) {
    .nav-link, .btn, .social-link {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .player-button, .play-btn, .pause-btn, .stop-btn {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Specjalne dopasowania dla galerii obrazków */
.gallery-item {
    position: relative;
    overflow: hidden;
}

.gallery-item img {
    transition: transform 0.3s ease;
    width: 100%;
    display: block;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Dopasowanie wysokości obrazków w różnych sekcjach */
.project-image img, .book-cover img {
    height: 200px;
    width: 100%;
    object-fit: cover;
}

.book-cover img {
    height: 300px;
}

/* Responsywne dopasowanie dla Bootstrap tabs */
@media (max-width: 768px) {
    .nav-pills {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-pills .nav-link {
        width: 100%;
        max-width: 250px;
        margin: 2px 0;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .nav-pills .nav-link {
        font-size: 0.85rem;
        padding: 6px 12px;
    }
}