/* ==========================================================================
   1. Global Styles & Variables
   ========================================================================== */

/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap');

:root {
    /* Colors */
    --color-primary: #3BB273;
    --color-primary-dark: #2b8a5b;
    --color-secondary: #FFC800;
    --color-text: #201E1F;
    --color-text-light: #878787;
    --color-white: #FFFFFF;
    --color-black: #000000;
    --color-border: #D3D3D3;
    --color-footer-bg: #201E1F;
    --color-footer-link: #62c1e5;
    --color-footer-link-hover: #e69598;
    --color-transparent: transparent;
    
    /* Backgrounds */
    --bg-gradient: linear-gradient(-20deg, #e9defa 0%, #fbfcdb 100%);
    --bg-lightbox-painting: linear-gradient(120deg, #84fab0 0%, #8fd3f4 100%);

    /* Typography */
    --font-primary: 'Inter', Verdana, Geneva, sans-serif;
    --font-secondary: 'Georgia', 'Times New Roman', serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 100%; /* Base font size for accessibility */
    -ms-text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-primary);
    font-optical-sizing: auto;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-black);
    background-image: var(--bg-gradient);
    background-attachment: fixed;
}

/* Sticky footer setup */
.site-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content-area {
    flex-grow: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
}

img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ==========================================================================
   2. Typography
   ========================================================================== */

h1, h2, h3, h4 {
    font-family: var(--font-primary);
    font-optical-sizing: auto;
    margin: 1.5em 0 0.8em;
}

h1 { font-size: 2.5rem; font-weight: 400; line-height: 1.2; }
.welcome-content h1 { font-size: 2.2rem; }
h2 { font-size: 2rem; font-weight: 700; line-height: 1.3; }
h3 { font-size: 1.5rem; font-weight: 500; line-height: 1.4;}
h4 { font-size: 1.25rem; font-weight: 500; line-height: 1.5; color: var(--color-primary); }

p, ul {
    font-size: 1.0625rem; /* 17px */
    font-weight: 400;
    margin: 0 0 1.5em;
}

ul {
    padding-left: 2em;
}

.text-link {
    color: var(--color-primary);
    transition: border-color 0.2s ease;
    border-bottom: 2px solid var(--color-transparent);
}

.text-link:hover {
    border-bottom-color: var(--color-secondary);
}

.no-wrap {
    display: inline-block;
}

/* ==========================================================================
   3. Site Header & Navigation
   ========================================================================== */

.site-header {
    width: 100%;
    padding: 1rem 1rem 0rem 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    width: auto;
    height: 3.375rem;
    user-select: none;
    display: none;
}

/* --- Mobile Navigation --- */
.mobile-menu-toggle {
    color: var(--color-white);
    background: var(--color-primary);
    padding: 0 1rem;
    text-decoration: none;
    font-size: 2rem; /* 32px */
    line-height: 1.5;
    cursor: pointer;
    user-select: none;
}

.mobile-nav-links {
    display: none; /* Initially hidden, controlled by JS */
    margin-top: 1rem;
}

.body-contact-page .mobile-nav-links {
    margin-bottom: 1rem;
}

.mobile-nav-links.is-open {
    display: block;
}

.mobile-nav-links a {
    display: block;
    width: 100%;
    background-color: var(--color-primary);
    color: var(--color-transparent);
    text-shadow: 0 0 0 var(--color-white);
    transition: text-shadow 0.1s ease-in-out;
    text-align: center;
    font-size: 2rem; /* 32px */
    line-height: 1.5;
    margin-bottom: 5px;
}

.mobile-nav-links a:last-of-type {
    margin-bottom: 0;
}

.mobile-nav-links a:hover {
    text-shadow: 4px 4px 0 var(--color-secondary);
}

.mobile-nav-links .mobile-submenu {
    background-color: var(--color-primary-dark);
    font-size: 1.5rem;
}

/* --- Desktop Navigation --- */
.main-nav {
    display: none; /* Hidden on mobile by default */
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.875rem; /* 14px */
}

.nav-link {
    display: block;
    background-color: var(--color-primary);
    color: var(--color-transparent);
    text-shadow: 0 0 0 var(--color-white);
    transition: text-shadow 0.15s ease-in-out;
    text-align: center;
    font-size: 2.25rem; /* 36px */
    line-height: 1.5;
    padding: 0 1rem;
    user-select: none;
}

.nav-link:hover {
    text-shadow: 4px 7px 0 var(--color-secondary);
}

/* Dropdown Menu */
.dropdown {
    display: flex;
    align-items: stretch;
}

.dropdown-trigger-wrapper {
    position: relative;
}

.split-button-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 1.125rem; /* 18px */
    cursor: pointer;
    background-color: var(--color-primary);
    border-left: 1px solid rgba(255, 255, 255, 0.5);
    transition: background-color 0.2s ease-in-out;
}

.split-button-trigger::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--color-white);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.dropdown-menu {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    background-color: var(--color-white);
    min-width: 220px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 10;
    list-style: none;
    padding: 0;
    margin: 0;
    border: 1px solid var(--color-border);
    border-bottom: 2px solid var(--color-secondary);
}

.dropdown-menu a {
    font-size: 1.125rem; /* 18px */
    font-weight: 500;
    color: var(--color-text);
    padding: 0.75rem 1.25rem;
    text-align: left;
    display: block;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.dropdown-menu a:hover {
    color: var(--color-primary);
    border-bottom-color: var(--color-secondary);
}

.dropdown-trigger-wrapper:hover .dropdown-menu {
    display: block;
}

.dropdown-trigger-wrapper:hover .split-button-trigger {
    background-color: var(--color-primary-dark);
}

.dropdown-trigger-wrapper:hover .split-button-trigger::after {
    transform: rotate(180deg);
    border-top-color: var(--color-secondary);
}

/* ==========================================================================
   4. Main Content & Page Sections
   ========================================================================== */
.latest-posts-title {
    margin-top: 0;
    margin-bottom: 1.75rem;
}

.about-section-title {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

/* --- Post Previews (Category Pages) --- */
.post-preview {
    margin-bottom: 2rem;
}

.content-area > .post-preview:first-child {
    margin-top: 1rem;
}

.post-preview:last-child {
    margin-bottom: 0;
}

.post-preview .post-thumbnail-link {
    display: block;
    margin-bottom: 1rem;
}

.post-preview > img {
    margin-bottom: 1rem;
}

.post-preview .post-content {
    padding: 0 0.5rem;
}

.post-preview .post-content h3 {
    margin: 0.5rem 0;
}

.post-preview .post-content time {
    display: block;
    color: var(--color-primary);
    font-weight: 500;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.post-preview .post-content p {
    text-align: justify;
    margin-bottom: 1.5rem;
}

.read-more-link {
    display: inline-block;
    font-weight: 700;
    background-color: var(--color-primary);
    color: var(--color-white);
    border: 2px solid var(--color-primary);
    padding: 0.5rem 1.25rem;
    text-decoration: none;
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.read-more-link:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}


/* --- Full Post (Article Page) --- */
.full-post {
    padding: 0;
}

.full-post .post-header {
    text-align: center;
    margin: 3rem 0 3.5rem;
}

.full-post .post-header h2 {
    font-weight: 400;
    line-height: 1.5;
    margin: 0;
}

.full-post .post-header time {
    font-weight: 400;
    font-size: 1.25rem;
    color: var(--color-primary);
    line-height: 1.5;
    margin: 0;
}

.full-post p {
    text-align: justify;
    padding: 0;
}

.full-post ul {
    list-style-type: square;
    list-style-position: inside;
    padding: 0 1.5rem;
    margin-bottom: 2rem;
}

.full-post h3 {
    margin-left: 0;
    margin-right: 0;
    font-weight: 400;
}

.full-post img,
.full-post video,
.full-post .table-container {
    margin: 0 auto 2rem;
}

.full-post video {
    border: 1px solid var(--color-text);
}

.table-container {
    overflow-x: auto; /* For responsive tables */
    margin: 2rem 0;
}
table {
    border-collapse: collapse;
    width: 100%;
}
td, th {
    border: 1px solid var(--color-border);
    text-align: left;
    padding: 0.5rem;
}
thead {
    background-color: var(--color-footer-bg);
    color: var(--color-white);
}
tbody tr:nth-child(even) {
    background-color: #f2f2f2;
}

/* --- Overriding responsive behavior for specific videos --- */
.full-post .video-master,
.full-post .video-bachelor {
    max-width: none; 
}

/* Base styles for videos (mobile first) */
.full-post .video-master { width: 250px; height: 175px; }
.full-post .video-bachelor { width: 320px; height: 180px; }


/* ==========================================================================
   5. About Page Specifics
   ========================================================================== */

/* --- "Who am I?" Section --- */
.bio-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.bio-photo-wrapper {
    flex-shrink: 0;
    position: relative;
    max-width: 155px; 
    width: 100%;
    padding: 0;
}

.bio-photo {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Washi tape effect using pseudo-elements */
.bio-photo-wrapper::before,
.bio-photo-wrapper::after {
    content: '';
    position: absolute;
    z-index: 1;
    width: 40px;
    height: 10px;
    background-color: var(--color-primary);
    opacity: 0.2;
    display: none; /* Hidden by default, shown on larger screens if needed */
}
.bio-photo-wrapper::before {
    top: 12.5px;
    left: -12.5px;
    transform: rotate(-45deg);
}
.bio-photo-wrapper::after {
    bottom: 12.5px;
    right: -12.5px;
    transform: rotate(-45deg);
}

.bio-text {
    text-align: center;
}

.bio-text p {
    font-size: 1.125rem;
    line-height: 1.6;
    margin-bottom: 1em;
}
.bio-text p:last-of-type {
    margin-bottom: 0em;
}

/* --- "Education" Section --- */
.education-card {
    background-color: var(--color-white);
    padding: 2rem 1.5rem;
    border-bottom: 3px solid var(--color-primary);
}

.education-grid {
    display: grid;
    grid-template-columns: 1fr; /* Default to one column on mobile */
    gap: 2rem;
    align-items: center;
}

.education-card .university-name {
    font-size: 1.25rem;
    font-weight: 400;
    margin: 0;
    color: var(--color-text);
    text-align: center;
    line-height: 1.4;
}

.degrees-grid {
    display: grid;
    grid-template-columns: 1fr; /* On mobile, degrees stack vertically */
    gap: 2rem;
    text-align: left;
}

.degree-item h4 {
    margin: 0 0 0.5rem;
}

.degree-item .info-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.degree-item .info-list li {
    padding-left: 1.25em;
    position: relative;
}

.degree-item .info-list li::before {
    content: '■';
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-size: 0.8em;
    top: 0.2em;
}

/* --- "My Passions" Section --- */
.featured-categories-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

.category-item {
    /* Grouping container for card and caption */
}

.category-card {
    position: relative;
    display: block;
    height: 150px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    text-decoration: none;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.4), rgba(0,0,0,0.1));
    z-index: 1;
}

.category-caption {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.075em;
    margin: 0.75rem 0 0 0;
    transition: color 0.2s ease;
}

/* Linked Hover Effect (CSS-Only) */
.category-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15), 0 6px 20px rgba(0, 0, 0, 0.15);
}
.category-card:hover + .category-caption {
    color: var(--color-primary);
}

.card-electronics {
  background-image: url('../images/about/category-card-electronics.webp');
}

.card-paintings {
  background-image: url('../images/about/category-card-paintings.webp');
}

.card-music {
  background-image: url('../images/about/category-card-music.webp');
}

/* ==========================================================================
   6. Contact Page Specifics
   ========================================================================== */

/* Vertically and horizontally centers the main content card */
.body-contact-page .content-area {
    display: flex;
    align-items: center;      /* Vertical centering */
    justify-content: center; /* Horizontal centering */
}
    
/* Main card-style container, similar to "About" page */
.contact-card {
    background-color: var(--color-white);
    max-width: 850px;
    margin: 0;
    width: 100%;
    padding: 2.5rem 3rem;
    border-bottom: 3px solid var(--color-primary);
    text-align: center;
}

.contact-intro h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 1rem 0 1.5rem 0;
}

.contact-intro p {
    font-size: 1.125rem;
    color: var(--color-text-light);
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto 2.5rem;
}

/* Clickable email button styling */
.contact-email {
    display: flex;
    justify-content: center;
}

.contact-email a {
    display: inline-block;
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 1rem 2rem;
    font-size: 1.25rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.contact-email a:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
}

/* Social media icons section */
.contact-socials {
    margin-top: 3rem;
    display: none;
}

.separator-line {
    width: 80%;
    height: 1px;
    background-color: var(--color-border);
    margin: 0 auto 1.5rem;
}

.contact-socials p {
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-icons a {
    display: block;
}

.social-icons img {
    width: 32px;
    height: 32px;
    opacity: 0.7;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.social-icons a:hover img {
    opacity: 1;
    transform: scale(1.1);
}

/* ==========================================================================
   7. Galleries & Lightbox
   ========================================================================== */

.lightbox-trigger,
.image-gallery-grid img,
.gallery-thumbnail {
    cursor: zoom-in;
}

.image-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
    justify-content: center;
    align-items: center;
}

/* Reduces top margin for headings immediately following a gallery */
.image-gallery-grid + h3,
.image-gallery-grid + h4 {
    margin-top: -0.75rem;
}

.gallery-thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    justify-content: center;
    gap: 1.25rem 0.625rem;
}

.gallery-thumbnail {
    width: 150px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    justify-self: center;
}
.gallery-thumbnail:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2), 0 6px 20px rgba(0, 0, 0, 0.3);
}

.lightbox-container {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}
.lightbox-container.is-open {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}
.lightbox-container.lightbox-paintings {
    background-image: var(--bg-lightbox-painting);
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}
#lightboxImage {
    display: block;
    max-width: 100%;
    max-height: 90vh;
    margin: auto;
}

/* Selektory dla przycisków i zamknięcia w Lightboxie */
.lightbox-close, 
.lightbox-prev, 
.lightbox-next {
    cursor: pointer;
    position: absolute;
    color: var(--color-white);
    font-weight: bold;
    font-size: 2.5rem; /* Domyślny rozmiar na mobile */
    transition: 0.2s ease;
    user-select: none;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
    z-index: 1001; /* Upewniamy się, że są nad obrazkiem */
}

.lightbox-close:hover, 
.lightbox-prev:hover, 
.lightbox-next:hover {
    color: var(--color-border);
}

.lightbox-close { 
    top: 15px; 
    right: 35px; 
    font-size: 3.5rem; 
}

/* NOWE STYLE - Przyciski nawigacji na dole ekranu (Mobile-First) */
.lightbox-prev, .lightbox-next {
    top: auto; /* Usuwamy pozycjonowanie od góry */
    transform: none; /* Usuwamy centrowanie w pionie */
    bottom: 20px; /* Umieszczamy 20px od dolnej krawędzi */
    padding: 0.75rem 1rem; /* Zmieniamy padding */
    background-color: rgba(0, 0, 0, 0.5); /* Dodajemy tło dla widoczności */
    border-radius: 5px; /* Zaokrąglamy rogi */
}

.lightbox-prev { 
    left: 20px; /* Lewy przycisk 20px od lewej */
}

.lightbox-next { 
    right: 20px; /* Prawy przycisk 20px od prawej */
}

/* Styles for the "Paintings" lightbox variant */
.lightbox-paintings .lightbox-close,
.lightbox-paintings .lightbox-prev,
.lightbox-paintings .lightbox-next {
    color: var(--color-primary);
}
.lightbox-paintings .lightbox-close:hover,
.lightbox-paintings .lightbox-prev:hover,
.lightbox-paintings .lightbox-next:hover {
    color: var(--color-text-light);
}

/* ==========================================================================
   8. Homepage & Main Content Sections
   ========================================================================== */

.main-full-height {
    display: flex;
    flex-direction: column;
    justify-content: center; /* This centers the .homepage-wrapper vertically */
}

.homepage-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
}

/* Welcome Section */
.welcome-section {
    text-align: center;
    padding: 2rem 1rem;
    margin-bottom: 0;
    margin-top: 1.5rem;
}
.welcome-content h1 {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 1.5rem;
}
.welcome-content p {
    font-size: 1.125rem;
    color: var(--color-text-light);
    max-width: 650px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

/* Latest Posts Section */
.latest-posts-section {
    background-color: var(--color-white);
    padding: 2rem;
    margin-top: 0;
    margin-bottom: 3rem;
}
.latest-posts-section .section-title {
      margin-top: 0;
}
.latest-posts-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
.latest-post-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1.5rem;
}
.latest-post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.post-category-tag {
    font-size: 0.875rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    color: var(--color-white);
    align-self: flex-start;
}
.tag-electronics { background-color: #3b82f6; }
.tag-paintings { background-color: #ef4444; }
.tag-music { background-color: #22c55e; }

.latest-post-item h3 {
    margin: 0;
    font-size: 1.375rem;
}
.latest-post-item h3 a:hover {
    text-decoration: underline;
}
.latest-post-item p {
    margin: 0;
    color: var(--color-text-light);
    font-size: 1rem;
    line-height: 1.6;
}


/* ==========================================================================
   9. Site Footer
   ========================================================================== */

.site-footer {
    background-color: var(--color-footer-bg);
    text-align: center;
    margin-top: 3rem;
    padding: 0.5rem 0;
}

.main-full-height + .site-footer {
    margin-top: 0;
}

.footer-symbol-link {
    display: inline-block;
    vertical-align: middle;
    line-height: 0;
    margin: 0.75rem 0;
}

.footer-symbol {
    display: block;
    width: 1.25rem;
    height: 1.25rem;
    transition: filter 0.25s ease-in-out;
    /* Blue */
    filter: brightness(0) saturate(100%) invert(80%) sepia(32%) saturate(831%) hue-rotate(156deg) brightness(96%) contrast(89%);
}

/* Zmiana koloru po najechaniu na link */
.footer-symbol-link:hover .footer-symbol {
    /* Red */
    filter: brightness(0) saturate(100%) invert(78%) sepia(13%) saturate(1750%) hue-rotate(307deg) brightness(92%) contrast(92%);
}

/* ==========================================================================
   10. Media Queries (Desktop and larger screens)
   ========================================================================== */

/* --- Tablet size and up (600px) --- */
@media (min-width: 600px) {
    .full-post .video-master { width: 320px; height: 224px; }
    .full-post .video-bachelor { width: 410px; height: 230px; }
}

/* --- Navigation Switch & Layout Adjustments (673px) --- */
@media (min-width: 673px) {
    .mobile-menu-toggle,
    .mobile-nav-links {
        display: none;
    }
    .main-nav {
        display: block;
    }
    .content-area {
        padding: 0 2rem;
    }
}

/* --- Larger Tablet & Small Desktop (768px) --- */
@media (min-width: 768px) {
    .welcome-content h1 { font-size: 3.2rem; }

    .latest-posts-list { grid-template-columns: repeat(2, 1fr); }
    
    .latest-post-item {
        border-bottom: none;
        padding-bottom: 0;
    }

    /* Full Post Video Sizing */
    .full-post .video-master { width: 413px; height: 290px; }
    .full-post .video-bachelor { width: 530px; height: 298px; }

    /* About Page: Two-column bio with separator */
    .bio-grid {
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 2.5rem;
    }

    .bio-text {
        text-align: justify;
        position: relative;
    }

    /* Vertical Separator for Bio */
    .bio-text::before {
        content: '';
        display: block;
        position: absolute;
        left: -1.25rem;
        top: 10%;
        height: 80%;
        width: 2px;
        background-color: var(--color-primary);
        border-radius: 2px;
    }
    
    /* About Page: Two-column layout for Education card */
    .education-card {
        padding: 2.5rem;
    }
    .education-grid {
        grid-template-columns: 1fr 2fr; 
        gap: 2.5rem;
    }
    .degrees-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* PRZYWRÓCENIE STYLI - Klasyczny wygląd na tabletach i komputerach */
    .lightbox-prev, .lightbox-next {
        top: 50%; /* Przywracamy pozycję na środku w pionie */
        transform: translateY(-50%); /* Przywracamy centrowanie */
        bottom: auto; /* Usuwamy pozycjonowanie od dołu */
        background-color: transparent; /* Usuwamy tło */
        padding: 1rem; /* Przywracamy oryginalny padding */
        font-size: 2.5rem; /* Przywracamy większy rozmiar */
    }

    .lightbox-prev { 
        left: 0; 
    }
    
    .lightbox-next { 
        right: 0; 
    }

    /* About Page: Three-column categories grid */
    .featured-categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- Medium Desktop (992px) --- */
@media (min-width: 992px) {
    .latest-posts-list { grid-template-columns: repeat(3, 1fr); }

    /* Full Post Video Sizing */
    .full-post .video-master { width: 500px; height: 350px; }
    .full-post .video-bachelor { width: 640px; height: 360px; }

    /* Homepage Grid: Switch to 3 columns */
    .homepage-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- Large Desktop (1400px) --- */
@media (min-width: 1400px) {
    /* Remove horizontal padding when container is at max-width */
    .content-area {
        padding: 0;
    }
    .site-header {
        padding-left: 0;
        padding-right: 0;
    }
    .welcome-section {
        margin-top: 0;
    }
}