@font-face {
    font-family: 'Cardo';
    src: url('assets/fonts/Cardo-Regular.woff2') format('woff2'),
         url('assets/fonts/Cardo-Regular.woff') format('woff'),
         url('assets/fonts/Cardo-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cardo';
    src: url('assets/fonts/Cardo-Bold.woff2') format('woff2'),
         url('assets/fonts/Cardo-Bold.woff') format('woff'),
         url('assets/fonts/Cardo-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cardo';
    src: url('assets/fonts/Cardo-Italic.woff2') format('woff2'),
         url('assets/fonts/Cardo-Italic.woff') format('woff'),
         url('assets/fonts/Cardo-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

:root {
    --text-color: #111111;
    --accent: #ac2f01;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Cardo', Georgia, 'Times New Roman', serif;
    color: var(--text-color);
    background: #ffffff;
    line-height: 1.6;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover{
    color: #7d5a76;
}

.main {
    position: relative;
    width: 100%;
}

.quorr-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    container-type: inline-size;
}

.quorr-image {
    display: block;
    width: 100%;
    height: auto;
}

.content-wrapper {
    line-height: 0.8rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-95%, 15%);
    width: 45%;
    max-width: 700px;
    z-index: 2;
    font-size: 1.7cqw;
}

h1 {
    font-size: 2.5em;
    letter-spacing: 0.15em;
    margin: 0;
    font-weight: 700;
    line-height: 1.2;
}

p {
    margin: 0;
    font-size: 1em;
    line-height: 1.5;
}

address {
    font-style: normal;
    font-size: 0.95em;
    line-height: 1.5;
}

.font-italic {
    font-style: italic;
}

.portfolio-section {
    background: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 10px;
    box-sizing: border-box;
}

#img-container {
    width: 100%;
    min-height: calc(100vh - 20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    box-sizing: border-box;
}

.portfolio-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    user-select: none;
    z-index: 10;
}

#img-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 1.0);
    padding: 10px 20px;
    z-index: 100;
    font-weight: 500;
    font-size: 1rem;
    pointer-events: none;
    transition: opacity 0.2s;
}

#img-loader:not(.hidden) {
    display: block;
    animation: bounce-scale 1s ease-in-out infinite;
}

@keyframes bounce-scale {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
}

#img-loader.hidden {
    display: none;
    opacity: 0;
}

.portfolio-controls button {
    background: none;
    border: 1px solid #111111;
    color: #111111;
    padding: 0.3rem 0.8rem;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    transition: background 0.2s;
}

.portfolio-controls button:hover {
    background: #f0f0f0;
}

.portfolio-controls button:disabled {
    opacity: 0.3;
    cursor: default;
}

#page-info {
    font-weight: 500;
    min-width: 80px;
    text-align: center;
}

.img-view {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
    user-select: none;
    -webkit-user-select: none;
    background-color: #eee;
    line-height: 0;
    font-size: 0;
    gap: 0;
}

.img-view img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 80px);
    width: auto;
    height: auto;
    object-fit: contain;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    margin: 0;
    padding: 0;
}

.img-view.spread img {
    max-width: 50%;
    width: auto;
    height: auto;
}

/* Fullscreen Styles */
#img-container:fullscreen {
    background-color: #1a1a1a;
    width: 100vw;
    height: 100vh;
    max-width: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

#img-container:fullscreen .portfolio-controls {
    color: #ffffff;
    position: absolute;
    top: 20px;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 4px;
}

#img-container:fullscreen .portfolio-controls button {
    border-color: #ffffff;
    color: #ffffff;
}

#img-container:fullscreen .img-view {
    max-height: 90vh;
    max-width: calc(100vw - 40px);
}

#img-container:fullscreen .img-view img {
    max-height: 90vh;
}

#img-container:fullscreen #img-loader:not(.hidden) {
    display: block;
    background: rgba(0, 0, 0, 0.85);
    color: #ffffff;
    border: 1px solid #444;
    font-size: 1.2rem;
    padding: 15px 25px;
    z-index: 1000;
}

@media (max-width: 768px) {
    .content-wrapper {
        font-size: clamp(9.5px, 2.3cqw, 16px);
        width: 47%;
        transform: translate(-96%, 12%);
    }

    .portfolio-controls {
        gap: 0.8rem;
        font-size: 0.85rem;
    }

    .portfolio-controls button {
        padding: 0.3rem 0.6rem;
        font-size: 1.1rem;
    }
}

