@font-face {
	font-display: swap;
	font-family: tariff-book;
	src: url(../fonts/Tariff-Book.woff2),
	url(../fonts/Tariff-Book.woff);
	font-weight: normal;
	font-style: normal;
}

@font-face {
	font-display: swap;
	font-family: tariff-lightitalic;
	src: url(../fonts/Tariff-LightItalic.woff2),
	url(../fonts/Tariff-LightItalic.woff);
	font-weight: normal;
	font-style: normal;
}

@font-face {
	font-display: swap;
	font-family:Asap-Bold;
	src: url(../fonts/Asap-Bold.woff2),
	url(../fonts/Asap-Bold.woff);
	font-weight: normal;
	font-style: normal;
}

@font-face {
	font-display: swap;
	font-family: Asap-light;
	src: url(../fonts/Asap-Light.woff2), 
	url(../fonts/Asap-Light.woff);
	font-weight: normal;
	font-style: normal;
}

/* Base Styles and Variables */
:root {
    --color-background: #ffffff;
    --color-sidebar: #ffffff;
    --color-content-bg: #e5e8ed;
    --color-text: #000000;
    --color-accent: #EF8D65;
    --color-placeholder: #707070;
    --font-heading: 'Asap-Bold', sans-serif;
    --font-body: 'tariff-book', serif;
	--font-nav: 'Asap-light' , serif;
    --sidebar-width: 20%;
    --content-width: 80%;
    --gutter: 1.5rem;
}

.container {
    margin-left: auto;
    margin-right: auto;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--color-text);
    margin: 0;
    padding: 0;
}

a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Layout Structure */
.page-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--color-sidebar);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
}

.logo {
    margin-bottom: 4rem;
}

.logo img {
    max-width: 100px;
}

/* Navigation Styles */
.logo {
	background-image: url(../images/LogoSprite.png);
	width: 125px;
	height: 69px;
}

.logo:hover {
	background-position: left -69px;

}

.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.main-nav li {
    margin-bottom: 1.5rem;
}

.main-nav a {
    font-family: var(--font-nav);
    font-size: 1.1rem;
    position: relative;
    display: inline-block;
}

.main-nav a::after {
    content: "•";
    color: var(--color-accent);
    position: absolute;
    right: -1.2rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: translateY(-50%) translateX(-10px);
    font-size: 3rem;
}


.main-nav a:hover::after,
.main-nav a.active::after {
    opacity: 1; 
    transform: translateY(-50%) translateX(0); 
}

/* Submenu Styles */
.main-nav li.has-submenu {
    position: relative;
    margin-bottom: 0.5rem;
}

.main-nav .submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    padding-left: 1.5rem;
    max-height: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.main-nav li.has-submenu.active .submenu,
.main-nav li.has-submenu:hover .submenu {
    max-height: 200px;
    opacity: 1;
}

.main-nav .submenu li {
    margin-bottom: 0.75rem;
    margin-top: 0.75rem;
}

.main-nav .submenu a {
    font-size: 0.95rem;
    opacity: 0.85;
    position: relative;
}

.main-nav .submenu a::before {
    content: "—";
    color: var(--color-accent);
    position: absolute;
    left: -1.2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.main-nav .submenu a:hover::before,
.main-nav .submenu a.active::before {
    opacity: 1;
}

.main-nav .submenu a::after {
    display: none;
}

@media only screen and (max-width: 48rem) {
    .main-nav .submenu {
        padding-left: 1rem;
    }
    
    .main-nav .submenu a {
        font-size: 0.85rem;
    }
    
    .main-nav .submenu li {
        margin-bottom: 0.5rem;
        margin-top: 0.5rem;
    }
}

/* Footer Styles */
.sidebar-footer {
    margin-top: auto;
}

.social-links {
    list-style: none;
    padding: 0;
    margin: 0;
    margin-bottom: 1.5rem;
}

.social-links li {
    margin-bottom: 0.25rem;
}

.social-links a {
    font-family: var(--font-body);
}

.social-links a:hover {
	color:#EF8D65;	
}

.copyright {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Home Page Styles */
.home-content {
    position: relative;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    overflow: hidden;
}

.background-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
    transition: opacity 1s ease;
}

.home-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.home-title {
    font-family: var(--font-heading);
    font-size: 5rem;
    margin: 0 0 1rem 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.home-categories {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    font-family: var(--font-nav);
    font-size: 1.70rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    text-align: center;
    padding: 0 1rem;
}

.category {
    letter-spacing: 1px;
}

.plus-sign {
    color: var(--color-accent);
    font-size: 2.5rem;
    font-family: var(--font-heading);
    display: inline-block;
    transform: translateY(-5px);
    position: relative;
}

/* Main Content Styles */
.main-content {
    width: var(--content-width);
    margin-left: var(--sidebar-width);
    background-color: var(--color-content-bg);
    padding: 2rem;
    box-sizing: border-box;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    margin-bottom: 2rem;
}

.section-title-archive {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    margin:0;
}

.archive-description {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 0;
    padding-bottom: 1rem;
}

/* Project Grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* Project Item Base Styles */
.project-item {
    background-color: var(--color-placeholder);
    aspect-ratio: 1/1;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
    transition: border 0.3s ease;
}

.project-image {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-image .static-image,
.project-image .hover-gif {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}


.project-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}


.project-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    z-index: 2;
}

.project-title {
    font-family: var(--font-heading);
    margin: 0;
    color: white;
}

.project-subtitle {
    font-family: var(--font-body);
    margin: 0;
    color: white;
    font-size: 0.9rem;
}

.arrow-icon {
    font-size: 3rem;
    position: absolute;
    bottom: 0.3rem;
    right: 1rem;
    color: var(--color-accent);
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}


/* Loading indicator */
.loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.loading-indicator.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(229, 232, 237, 0.3);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Images initial state - hidden while loading */
.project-image.loading .static-image,
.project-image.loading .hover-gif,
.project-image.loading img {
    opacity: 0;
}

/* Show elements on hover */
.project-image .hover-gif {
    opacity: 0;
}

.project-item:hover .hover-gif {
    opacity: 1;
}

.project-item:hover .static-image {
    opacity: 0;
}

.project-item:hover {
    border: 6px solid var(--color-accent);
}

.project-item:hover::after {
    opacity: 1;
}

.project-item:hover .project-info {
    opacity: 1;
    transform: translateY(0);
}

.project-item:hover .arrow-icon {
    opacity: 1;
    transform: translateX(0);
}

/* Modal Item Styles (for clickable images without links) */
.project-item.modal-item {
    cursor: pointer;
}

.project-item.modal-item .project-image img {
    cursor: pointer;
}

/* Remove arrow icon for modal items since they don't navigate */
.project-item.modal-item .arrow-icon {
    display: none;
}

/* Ensure hover effects still work for modal items */
.project-item.modal-item:hover {
    border: 6px solid var(--color-accent);
}

.project-item.modal-item:hover::after {
    opacity: 1;
}

.project-item.modal-item:hover .project-info {
    opacity: 1;
    transform: translateY(0);
}

/* Info Page Styles */
.info-container {
    max-width: 1280px;
    margin: 0 auto;
}

.info-layout {
    display: flex;
    gap: 5%;
    height: 100%;
}

.info-image-container {
    flex: 1;
    max-width: 40%;
}

.info-image {
    width: 100%;
    height: auto;
    background-color: var(--color-placeholder);
}

.info-content {
    flex: 1;
    flex-direction: column;
    max-width: 40%;
}

.info-heading {
    font-family: var(--font-nav);
    font-size: 1.8rem;
    margin: 0;
    padding-bottom: 30px;
}

.info-text {
    margin-bottom: 3rem;
}

.info-paragraph {
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-nav);
    line-height: 30px;
}

.info-paragraph:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.info-buttons {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-heading);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.btn-outline {
    background-color: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-text);
}

.btn-outline:hover {
    background-color: var(--color-accent);
    border-color: var(--color-text);
    color:#eee;
}

.btn-primary {
    color: var(--color-text);
    border: 1px solid var(--color-text);
}

.btn-primary:hover {
    background-color: var(--color-accent);
    border-color: var(--color-text);
    color:#eee;
}

/* Extra small devices */
@media only screen and (max-width: 30rem) { /* 480px */
	.container {
        width: 90%;
    }
	
	.page-wrapper {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: relative;
        padding: 1.5rem;
        margin-bottom: 1rem;
    }

    .logo {
        margin-bottom: 2rem;
    }

    .main-content {
        width: 100%;
        margin-left: 0;
        padding: 1.5rem;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }
}

/* Small devices */
@media only screen and (max-width: 48rem) { /* 768px */
	.container {
        width: 87.5%;
    }
	
	.page-wrapper {
        flex-direction: column;
        padding-bottom: 60px; 
    }

    /* Sidebar modifications */
    .sidebar {
        width: 100%;
        position: relative;
        padding: 1.5rem 1.5rem 0.5rem 1.5rem;
        margin-bottom: 0.5rem;
        flex-direction: column;
        justify-content: flex-start;
    }

    /* Logo adjustments */
    .logo {
        margin-bottom: 1.5rem;
    }

    /* Horizontal nav for mobile */
    .main-nav ul {
        display: flex;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .main-nav li {
        margin-bottom: 0.5rem;
    }

    .main-nav a {
        font-size: 0.9rem;
    }

    .main-nav a:after {
        display:none;
    }

    
    .main-content {
        width: 100%;
        margin-left: 0;
        padding: 1rem 1.5rem;
    }

    /* Project grid */
    .project-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Sticky footer for mobile */
    .sidebar-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background-color: white;
        padding: 0.75rem 0;
        border-top: 1px solid #eee;
        margin-top: 0;
        z-index: 100;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    }

    
    .social-links {
        display: flex;
        justify-content: center;
        gap: 2rem;
        margin-bottom: 0.5rem;
    }

    .social-links li {
        margin-bottom: 0;
    }

    
    .copyright {
        text-align: center;
        margin: 0;
    }

    .info-layout {
        flex-direction: column;
        gap: 2rem;
    }
    
    .info-image-container,
    .info-content {
        max-width: 100%;
    }
    
    .info-text {
        margin-bottom: 2rem;
    }
    
    .info-buttons {
        justify-content: space-between;
    }

    .archive-description {
        line-height: normal;
    }

    .home-title {
        font-size: 2.5rem;
    }
    
    .home-categories {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .plus-sign {
        display: none;
    }
}

/* Medium devices */
@media only screen and (min-width: 48.063rem) and (max-width: 61.25rem) { /* 769-980px */
	.container {
        width: 93.75%;
    }
	
	.sidebar {
        width: 25%;
    }

    .main-content {
        width: 75%;
        margin-left: 25%;
    }

    .project-grid {
        grid-template-columns: repeat(1, 1fr);
    }

    .archive-grid {
        grid-template-columns: repeat(1fr);
    }

    .archive-description {
        line-height: normal;
    }
}

/* Large devices */
@media only screen and (min-width: 61.313rem) and (max-width: 75rem) { /* 981-1200px */
    .container {
        width: 90%;
        max-width: 1140px;
    }
}

/* Extra large devices */
@media only screen and (min-width: 75.063rem) { /* 1201px+ */
    .container {
        width: 90%;
        max-width: 1400px;
    }
}

/* ============================================
   MODAL STYLES
   ============================================ */

/* Base Modal Styles */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

/* Modal Content Image - Improved sizing to prevent cropping */
.modal-content {
    max-width: calc(100vw - 160px);  /* Account for arrow buttons (80px each side) */
    max-height: calc(100vh - 140px); /* Account for close button (60px top) and counter (80px bottom) */
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: auto;
}

/* Modal Close Button */
.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1003;
    transition: color 0.3s ease;
    line-height: 1;
    user-select: none;
}

.modal-close:hover,
.modal-close:focus {
    color: var(--color-accent);
}

/* Modal Navigation Arrows */
.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    font-size: 3rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    z-index: 1002;
    transition: background-color 0.3s ease;
    user-select: none;
    line-height: 1;
}

.modal-nav:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

.modal-nav:active {
    background-color: rgba(255, 255, 255, 0.5);
}

.modal-nav:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.modal-prev {
    left: 20px;
}

.modal-next {
    right: 20px;
}

/* Hide navigation arrows when there's only one image */
.image-modal.single-image .modal-nav {
    display: none;
}

/* Modal Counter */
.modal-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    z-index: 1002;
    user-select: none;
}

/* Responsive Modal Styles */
@media only screen and (max-width: 48rem) {
    .modal-content {
        max-width: calc(100vw - 100px);  /* Smaller arrow space on mobile (50px each) */
        max-height: calc(100vh - 120px); /* Account for close button and counter on mobile */
    }
    
    .modal-nav {
        font-size: 2rem;
        padding: 0.5rem 1rem;
    }
    
    .modal-prev {
        left: 10px;
    }
    
    .modal-next {
        right: 10px;
    }
    
    .modal-counter {
        bottom: 15px;
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .modal-close {
        top: 10px;
        right: 15px;
        font-size: 30px;
    }
}

/* Extra Small Devices */
@media only screen and (max-width: 30rem) {
    .modal-content {
        max-width: calc(100vw - 80px);  /* Even tighter on very small screens (40px each) */
        max-height: calc(100vh - 100px);
    }
    
    .modal-nav {
        font-size: 1.5rem;
        padding: 0.4rem 0.8rem;
    }
    
    .modal-prev {
        left: 5px;
    }
    
    .modal-next {
        right: 5px;
    }
}