/* Base styles */
* {
    box-sizing: border-box;
}

body {
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    xbackground-color: #F0E8E5;
    color: white;
    padding-bottom: 60px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
}

.glass-bar-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1)
}

.glass-bar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    left: 0;
}	

.glass-bar {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    padding-top: 5px !important;
    box-sizing: border-box;
}

.glass-bar::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

.dark .glass-bar {
    background: rgba(24, 24, 27, 0.4);
    border-color: rgba(255, 255, 255, 0.05);
}

/* Header styles */
header {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 6px 10px 0;
}

header > div {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
}

/* mobile */
header img {
    height: 85px;
    width: 85px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 0;
    margin-top: 8px;
    margin-bottom: 4px;
}

/* mobile */
header h1 {
    font-size: 25px;
    font-weight: 600;
    margin: 0;
	color: #5EA500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    text-align: center;
    line-height: 1.3;
    padding-bottom: 4px;
}

/* Main container */
.max-w-container {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    flex: 1;
    padding-left: 10px;
    padding-right: 10px;
    width: 100%;
}

/* Files container — flex-wrap like internal tiles */
#presentations-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 2px;
    padding-bottom: 2px;
    justify-content: center;
}

/* Card styles — matches files-tiles.blade.php structure */
.presentation-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 200px;
    width: calc(50% - 4px);
    min-width: 0;
    overflow: hidden;
    background-color: white;
    border: 1px solid #688F24;
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: box-shadow 0.2s ease;
}

.presentation-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.presentation-card:hover .card-image-container img.has-thumbnail {
    transform: scale(1.05);
}

/* Card image container — fills available space */
.card-image-container {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.5s ease;
}

.card-image-container img.icon-fallback {
    width: auto;
    height: auto;
    max-width: 64px;
    max-height: 64px;
    object-fit: contain;
}

.card-image-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.05);
    pointer-events: none;
}

/* Card info section — compact bottom strip */
.card-info {
    display: flex;
    flex-direction: column;
    padding: 8px 12px;
    min-width: 0;
}

.card-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.card-title {
    font-size: 14px;
    font-weight: bold;
    line-height: 1.3;
    color: #5EA500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1;
    margin: 0;
}

.card-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #737373;
    gap: 8px;
}

.card-meta-row span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-download {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    padding: 2px;
    cursor: pointer;
    color: #888;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.card-download:hover {
    color: #688F24;
}

.card-download svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Footer */
footer {
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 100;
}

footer > div {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

footer span {
    margin-top: 5px;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    font-size: 0.875rem;
}

footer img {
    height: 20px;
    width: auto;
    display: block;
}

/* Responsive styles - Small screens (sm: 480px+) */
@media (min-width: 480px) {
    header img {
        height: 80px;
        width: 80px;
    }

    header h1 {
        font-size: 35px;
    }

    .presentation-card {
        width: calc(50% - 4px);
        height: 220px;
    }
}

/* Responsive styles - Medium-small screens (sm: 640px+) */
@media (min-width: 640px) {
    header h1 {
        font-size: 35px;
    }
    
    .max-w-container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .presentation-card {
        width: 240px;
        height: 240px;
    }

    #presentations-grid {
        justify-content: flex-start;
    }

    .folder-card {
        width: 15rem;
    }
}

/* Responsive styles - Medium screens (md: 768px+) */
@media (min-width: 768px) {
    header {
        padding: 8px 16px 0;
    }

    header > div {
        padding-left: 20px;
        padding-right: 20px;
    }
    
	/* desktop */
    header img {
        height: 85px;
        width: 85px;
        margin-top: 10px;
    }
    
	/* desktop */
    header h1 {
        font-size: 20px;
        line-height: normal;
    }
    
    .max-w-container {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    #presentations-grid {
        gap: 8px;
        padding-top: 20px;
        padding-bottom: 20px;
    }
    
    footer {
        padding: 0 16px 8px;
    }

    footer > div {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* Utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.not-selectable {
  -webkit-user-select: none; /* Safari */
  -ms-user-select: none;     /* IE/Edge (old) */
  user-select: none;         /* Modern browsers */
}

/* Container */
.folder-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	width: 100%;
}

/* Folder card */
.folder-card {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	height: 44px;
	width: 100%;
	max-width: 15rem;
	padding: 0 0.75rem;
	overflow: hidden;

	background-color: #ffffff;
	border: 1px solid #000000;
	border-radius: 0.375rem;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);

	cursor: pointer;
	transition: box-shadow 0.2s ease;
}

/* Hover */
.folder-card:hover {
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Dark mode */
.dark .folder-card {
	background-color: rgba(24, 24, 27, 0.9); /* zinc-900/90 */
	border-color: #404040;
}


/* Inner content */
.folder-card-inner {
	display: flex;
	align-items: center;
	gap: 0.5rem; /* gap-2 */
	flex: 1;
	min-width: 0;
}

/* Icon */
.folder-icon {
	width: 1.25rem; /* w-5 */
	height: 1.25rem; /* h-5 */
	flex-shrink: 0;
}

/* Folder name */
.folder-name {
	min-width: 0;
	font-size: 0.875rem; /* text-sm */
	font-weight: 500;
	line-height: 1.25;
	color: #171717; /* neutral-900 */
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Dark mode text */
.dark .folder-name {
	color: #f5f5f5; /* neutral-100 */
}
