@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

:root {
    --primary-red: #e31e24;
    --secondary-blue: #75b9e7;
    --dark-text: #1a1a1a;
    --light-gray: #f8f9fa;
    --white: #ffffff;
    --bg-overlay: rgba(255, 255, 255, 0.92);
    --header-height: 70px;
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--dark-text);
    background-color: var(--white);
    background-image: url('../img/logo2Trans.png');
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 55%;
    /* Subtle watermark */
    min-height: 100vh;
}

/* Base shell layout */
.app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--bg-overlay);
    /* Ensures text readability over the background image */
}

/* Header styling */
.app-header {
    background-color: var(--white);
    border-bottom: 2px solid var(--primary-red);
    padding: 0 2rem;
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.brand-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-title .brand-link {
    color: var(--primary-red) !important;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
}

.brand-nav {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--dark-text) !important;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--secondary-blue) !important;
    border-bottom-color: var(--secondary-blue);
    text-decoration: none !important;
}

/* Main Content */
.app-main {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Footer styling */
.app-footer {
    background-color: var(--dark-text);
    color: var(--white);
    padding: 2rem;
    text-align: center;
    margin-top: auto;
}

/* Split Layout for Login/Access */
.split-layout {
    display: flex;
    min-height: calc(100vh - var(--header-height) - 100px);
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    margin: 2rem auto;
    max-width: 1100px;
}

.form-side {
    flex: 1;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo-side {
    flex: 1;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    border-left: 1px solid #eee;
}

.logo-side img {
    /* max-width: 80%; */
    height: auto;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.1));
}

@media (max-width: 768px) {
    .split-layout {
        flex-direction: column;
        margin: 1rem;
    }

    .logo-side {
        order: -1;
        padding: 2rem;
        border-left: none;
        border-bottom: 1px solid #eee;
    }

    .form-side {
        padding: 2rem;
    }
}


/* Common UI Elements */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--dark-text);
    font-weight: 700;
}

a {
    color: var(--primary-red);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-blue);
    text-decoration: underline;
}

.btn-primary,
.btn-kumbia {
    background-color: var(--primary-red) !important;
    color: white !important;
    border: none !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 6px rgba(227, 30, 36, 0.2) !important;
    transition: var(--transition) !important;
}

.btn-primary:hover {
    background-color: var(--secondary-blue) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(117, 185, 231, 0.3) !important;
}

/* Tables */
table.t {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: none !important;
}

table.t thead th {
    background-color: var(--light-gray);
    color: var(--dark-text);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    padding: 1rem;
    border-bottom: 2px solid var(--secondary-blue);
}

table.t td {
    padding: 1rem;
    border-bottom: 1px solid var(--light-gray);
}

/* Form controls */
input.control,
select.control,
textarea.control {
    border-radius: 8px !important;
    border: 1px solid #ddd !important;
    padding: 0.6rem 1rem !important;
    transition: var(--transition) !important;
}

/* Gallery and Viewer Styles */
.study-section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title i {
    color: var(--primary-red);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    background: #000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
}

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

.gallery-item:hover img {
    opacity: 0.8;
}

/* Lightbox / Modal Viewer */
#imageViewer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

#imageViewer.active {
    display: flex;
}

.viewer-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.viewer-content img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.viewer-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
}

.viewer-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
}

.viewer-nav button {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.viewer-nav button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.viewer-info {
    color: white;
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
}