/*
Theme Name: Jiří Svoboda Foto
Theme URI: https://www.jirisvobodafoto.cz
Author: Jiří Svoboda
Author URI: https://www.jirisvobodafoto.cz
Description: Minimální fotografické portfolio theme pro Jiřího Svobodu.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jiri-svoboda-foto
Tags: photography, portfolio, minimal
*/

/* =============================================
   RESET & BASE
   ============================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: #ffffff;
    color: #1A1A1A;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
}

/* =============================================
   LAYOUT
   ============================================= */

.site-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =============================================
   HEADER
   ============================================= */

.site-header {
    border-bottom: 1px solid #EAEAEA;
    padding: 20px 0;
}

.site-header .site-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.site-branding a {
    display: flex;
    align-items: baseline;
    gap: 6px;
    text-decoration: none;
}

.site-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1A1A1A;
    letter-spacing: -0.02em;
}

.site-name-sub {
    font-size: 1.25rem;
    font-weight: 400;
    color: #7A7A7A;
    letter-spacing: -0.02em;
}

/* NAV */

.main-navigation ul {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
    flex-wrap: wrap;
}

.main-navigation ul li a {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1A1A1A;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: color 0.2s ease;
}

.main-navigation ul li a:hover {
    color: #7A7A7A;
}

.main-navigation ul li.current-menu-item a {
    color: #7A7A7A;
}

/* =============================================
   FRONT PAGE
   ============================================= */

.frontpage-intro {
    text-align: center;
    padding: 64px 24px 40px;
}

.frontpage-intro p {
    font-size: 1.125rem;
    font-weight: 300;
    color: #1A1A1A;
    letter-spacing: 0.01em;
    max-width: 600px;
    margin: 0 auto;
}

.frontpage-divider {
    border: none;
    border-top: 1px solid #EAEAEA;
    margin: 0 0 48px 0;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    padding-bottom: 64px;
}

@media (min-width: 640px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 960px) {
    .portfolio-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.portfolio-item {
    display: block;
    text-decoration: none;
    color: #1A1A1A;
}

.portfolio-item:hover .portfolio-thumb img {
    opacity: 0.88;
    transform: scale(1.03);
}

.portfolio-thumb {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 2;
    background-color: #F5F5F5;
}

.portfolio-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.portfolio-thumb .placeholder-thumb {
    width: 100%;
    height: 100%;
    background-color: #EAEAEA;
}

.portfolio-label {
    text-align: center;
    padding: 12px 0 0;
    font-size: 0.8125rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #1A1A1A;
}

/* =============================================
   PAGE (category/portfolio pages)
   ============================================= */

.page-header {
    padding: 56px 0 32px;
    border-bottom: 1px solid #EAEAEA;
    margin-bottom: 48px;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}

.page-intro {
    max-width: 640px;
    color: #7A7A7A;
    font-size: 1rem;
    font-weight: 300;
}

.page-content {
    padding-bottom: 80px;
}

.page-content .wp-block-gallery {
    margin: 0 !important;
}

.page-content .wp-block-gallery .wp-block-image img {
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.page-content .wp-block-gallery .wp-block-image img:hover {
    opacity: 0.88;
    transform: scale(1.03);
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 600px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.gallery-grid-item {
    overflow: hidden;
    aspect-ratio: 3 / 2;
    background-color: #F5F5F5;
}

.gallery-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.gallery-grid-item img:hover {
    opacity: 0.88;
    transform: scale(1.03);
}

/* =============================================
   BLOG — home.php
   ============================================= */

.blog-header {
    padding: 56px 0 40px;
    border-bottom: 1px solid #EAEAEA;
    margin-bottom: 48px;
}

.blog-header h1 {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.03em;
}

.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    padding-bottom: 80px;
}

@media (min-width: 640px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 960px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.blog-card {
    display: block;
    text-decoration: none;
    color: #1A1A1A;
}

.blog-card:hover .blog-card-thumb img {
    opacity: 0.88;
    transform: scale(1.03);
}

.blog-card-thumb {
    overflow: hidden;
    aspect-ratio: 3 / 2;
    background-color: #F5F5F5;
    margin-bottom: 16px;
}

.blog-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.blog-card-thumb .no-thumb {
    width: 100%;
    height: 100%;
    background-color: #EAEAEA;
}

.blog-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.blog-card-date {
    font-size: 0.8125rem;
    color: #7A7A7A;
}

/* =============================================
   SINGLE POST
   ============================================= */

.single-header {
    padding: 56px 0 40px;
    max-width: 720px;
    margin: 0 auto;
}

.single-header h1 {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

.single-meta {
    font-size: 0.875rem;
    color: #7A7A7A;
}

.single-thumbnail {
    max-width: 960px;
    margin: 0 auto 48px;
}

.single-thumbnail img {
    width: 100%;
    height: auto;
}

.single-content {
    max-width: 720px;
    margin: 0 auto;
    padding-bottom: 80px;
}

.single-content p {
    margin-bottom: 1.5em;
    font-weight: 300;
    color: #1A1A1A;
}

.single-content h2,
.single-content h3,
.single-content h4 {
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 2em 0 0.75em;
}

.single-content h2 {
    font-size: 1.5rem;
}

.single-content h3 {
    font-size: 1.25rem;
}

.single-content a {
    border-bottom: 1px solid #EAEAEA;
    transition: border-color 0.2s ease;
}

.single-content a:hover {
    border-color: #1A1A1A;
}

.single-back {
    max-width: 720px;
    margin: 0 auto 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid #EAEAEA;
}

.single-back a {
    font-size: 0.875rem;
    color: #7A7A7A;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 500;
    transition: color 0.2s ease;
}

.single-back a:hover {
    color: #1A1A1A;
}

/* =============================================
   INDEX (fallback)
   ============================================= */

.index-content {
    padding: 48px 0 80px;
}

/* =============================================
   MOBILE NAV ADJUSTMENTS
   ============================================= */

@media (max-width: 640px) {
    .site-header .site-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .main-navigation ul {
        gap: 16px;
    }

    .single-header h1,
    .page-header h1,
    .blog-header h1 {
        font-size: 1.5rem;
    }
}

/* =============================================
   WORDPRESS CORE CLASSES
   ============================================= */

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: 0.875rem;
    color: #7A7A7A;
    text-align: center;
    padding: 8px 0;
}

.aligncenter {
    display: block;
    margin: 0 auto;
}

.alignleft {
    float: left;
    margin-right: 24px;
    margin-bottom: 16px;
}

.alignright {
    float: right;
    margin-left: 24px;
    margin-bottom: 16px;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* =============================================
   FOOTER
   ============================================= */

.site-footer {
    background: #F5F5F5;
    padding: 64px 0 0;
    margin-top: 80px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid #EAEAEA;
}

.footer-brand a {
    font-size: 1rem;
    font-weight: 300;
    color: #1A1A1A;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.footer-brand a span {
    font-weight: 500;
}

.footer-brand p {
    font-size: 0.8125rem;
    font-weight: 300;
    color: #7A7A7A;
    margin-top: 8px;
}

.footer-contact h4,
.footer-social h4 {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #ABABAB;
    margin: 0 0 16px 0;
}

.footer-contact ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-contact ul li a,
.footer-contact ul li {
    font-size: 0.875rem;
    font-weight: 300;
    color: #3A3A3A;
    text-decoration: none;
    transition: color 0.2s;
    line-height: 1.6;
}

.footer-contact ul li a:hover {
    color: #1A1A1A;
}

.footer-social-icons {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-social-icons li a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 300;
    color: #3A3A3A;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-social-icons li a:hover {
    color: #1A1A1A;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    font-size: 0.75rem;
    font-weight: 300;
    color: #ABABAB;
}

.footer-bottom a {
    color: #ABABAB;
    text-decoration: none;
    border-bottom: 1px solid #EAEAEA;
    margin-left: 8px;
    transition: color 0.2s, border-color 0.2s;
}

.footer-bottom a:hover {
    color: #1A1A1A;
    border-color: #1A1A1A;
}

@media (max-width: 768px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-brand {
        grid-column: 1;
    }
}