/* ============================================
   GENERAL STYLES
   ============================================ */

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

html {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

body {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: Helvetica, Arial, sans-serif;
    background-color: #0a0e27;
    color: #d0d0d0;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ============================================
   BACKGROUND GRADIENT
   ============================================ */

.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 50%, #0f0f0f 100%);
    z-index: -1;
}

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

.header {
    display: flex;
    flex-direction: column;
}

.header-top {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
    background-color: #ffffff;
    padding: 20px;
    gap: 20px;
}

/* Title Bar */
.title-bar {
    background-color: transparent;
    padding: 0;
    text-align: left;
    display: flex;
    align-items: flex-end;
    flex: 1;
}

.site-title {
    font-size: 2.5rem;
    font-weight: 400;
    color: #000000;
    margin: 0;
    font-family: Helvetica, Arial, sans-serif;
    line-height: 1;
}

/* Auth Section Container */
.auth-section-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 100%;
}

.auth-section-container .username {
    color: #000000;
    font-size: 0.95rem;
    margin-right: 15px;
}

.logout-btn,
.header-login-btn {
    background-color: #000000;
    color: #ffffff;
    border: 1px solid #000000;
    padding: 8px 16px;
    font-size: 0.95rem;
    font-weight: 400;
    cursor: pointer;
    font-family: Helvetica, Arial, sans-serif;
    transition: all 0.3s ease;
}

.logout-btn:hover,
.header-login-btn:hover {
    background-color: #1a1a1a;
    border-color: #1a1a1a;
}

.admin-link {
    color: #000000;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    margin-right: 15px;
    padding: 8px 16px;
    border: 1px solid #000000;
    border-radius: 3px;
    background-color: transparent;
    transition: all 0.3s ease;
    font-family: Helvetica, Arial, sans-serif;
    cursor: pointer;
}

.admin-link:hover {
    background-color: #000000;
    color: #ffffff;
}

/* Header Login Form Styles */
.header-login-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.header-login-input {
    background-color: #f5f5f5;
    color: #000000;
    border: 1px solid #cccccc;
    padding: 8px 12px;
    font-size: 0.9rem;
    font-family: Helvetica, Arial, sans-serif;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.header-login-input:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.header-password-wrapper {
    display: flex;
    align-items: center;
    position: relative;
}

.toggle-password-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 6px;
    margin-left: -30px;
    margin-right: 5px;
    z-index: 1;
}

.header-login-error {
    color: #cc0000;
    font-size: 0.85rem;
    flex-basis: 100%;
    display: none;
    text-align: right;
}

.header-login-success {
    color: #00aa00;
    font-size: 0.85rem;
    flex-basis: 100%;
    display: none;
    text-align: right;
}

.forgot-password-btn {
    background: none;
    border: none;
    color: #666666;
    cursor: pointer;
    font-size: 0.8rem;
    text-decoration: underline;
    padding: 0;
    flex-basis: 100%;
    text-align: right;
    transition: color 0.2s ease;
}

.forgot-password-btn:hover {
    color: #000000;
}

.reset-info {
    font-size: 0.9rem;
    color: #666666;
    flex-basis: 100%;
    text-align: center;
    margin: 5px 0;
}

/* Navigation Bar */
.nav-bar {
    background-color: #0d0d0d;
    padding: 15px 20px;
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}

.nav-button {
    background-color: transparent;
    border: 1px solid #606060;
    color: #ffffff;
    padding: 8px 16px;
    font-size: 0.95rem;
    font-weight: 400;
    cursor: pointer;
    font-family: Helvetica, Arial, sans-serif;
    transition: all 0.3s ease;
}

.nav-button:hover {
    border-color: #909090;
    background-color: #1a1a1a;
}

.nav-button.active {
    background-color: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

/* ============================================
   MAIN CONTAINER & SECTIONS
   ============================================ */

/* Carousel Section */
.carousel-section {
    width: 100%;
    background: linear-gradient(135deg, #2a2a2a 0%, #202020 50%, #151515 100%);
    padding: 40px 0;
}

.carousel-section .carousel-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Grid Section */
.grid-section {
    width: 100%;
    background-color: #0d0d0d;
    padding: 60px 20px;
}

.grid-section .grid-container {
    max-width: 100%;
    margin: 0 auto;
}

/* ============================================
   CAROUSEL STYLES
   ============================================ */

.carousel-wrapper {
    position: relative;
    width: 100%;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 500px;
    perspective: 1000px;
}

.carousel-card {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: scale(0.85) translateX(50px);
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    background: #1a1f3a;
    background-size: cover;
    background-position: center;
}

.carousel-card.active {
    opacity: 1;
    transform: scale(1) translateX(0);
    pointer-events: auto;
    z-index: 10;
    box-shadow: 0 30px 80px rgba(128, 128, 128, 0.3);
    background-size: cover;
}

.carousel-card.prev {
    opacity: 0.3;
    transform: scale(0.75) translateX(-80px);
    z-index: 5;
}

/* ============================================
   CAROUSEL OVERLAY
   ============================================ */

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 14, 39, 0.7) 0%, rgba(10, 14, 39, 0.4) 50%, transparent 100%);
    z-index: 2;
}

/* ============================================
   CAROUSEL CONTENT
   ============================================ */

.carousel-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding: 40px;
    z-index: 3;
}

.carousel-title {
    font-size: 2.5rem;
    font-weight: 500;
    color: #ffffff;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   CAROUSEL NAVIGATION
   ============================================ */

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(128, 128, 128, 0.2);
    border: 2px solid rgba(128, 128, 128, 0.5);
    color: #909090;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.carousel-nav:hover {
    background: rgba(128, 128, 128, 0.4);
    border-color: #909090;
    box-shadow: 0 0 20px rgba(128, 128, 128, 0.5);
}

.carousel-nav.prev {
    left: 20px;
}

.carousel-nav.next {
    right: 20px;
}

/* ============================================
   CAROUSEL INDICATORS
   ============================================ */

.carousel-indicators {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 15;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: #808080;
    box-shadow: 0 0 15px rgba(128, 128, 128, 0.6);
    transform: scale(1.3);
}

.indicator:hover {
    background: rgba(128, 128, 128, 0.7);
}

/* ============================================
   PORTFOLIO GRID (DEPRECATED - See grid-section)
   ============================================ */

.portfolio-grid {
    /* Styles moved to .grid-section */
}

/* Grid Container & Items */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    width: 100%;
}

.grid-item {
    background: rgba(26, 31, 58, 0.6);
    overflow: hidden;
    border: 1px solid rgba(128, 128, 128, 0.2);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    cursor: pointer;
    position: relative;
    aspect-ratio: 1;
    width: 100%;
}

.grid-item:hover {
    transform: scale(1.05);
    border-color: #808080;
    box-shadow: 0 15px 40px rgba(128, 128, 128, 0.2);
}

.grid-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #707070 0%, #505050 100%);
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    position: relative;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(10, 14, 39, 0.3) 0%, rgba(10, 14, 39, 0.7) 100%);
    z-index: 1;
}

.grid-title {
    padding: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #ffffff;
    position: relative;
    z-index: 2;
    width: 100%;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.footer {
    background-color: #ffffff;
    padding: 20px;
    text-align: left;
    display: flex;
    align-items: flex-start;
    min-height: 80px;
}

.footer p {
    color: #000000;
    margin: 0;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1;
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

@media (max-width: 768px) {
    .title {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .carousel-container {
        height: 350px;
    }

    .carousel-title {
        font-size: 1.8rem;
    }

    .carousel-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .carousel-nav.prev {
        left: 10px;
    }

    .carousel-nav.next {
        right: 10px;
    }

    .carousel-content {
        padding: 30px;
    }

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

    .portfolio-grid h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 40px 15px 25px;
    }

    .title {
        font-size: 1.8rem;
    }

    .carousel-container {
        height: 280px;
    }

    .carousel-title {
        font-size: 1.3rem;
    }

    .carousel-indicators {
        bottom: -50px;
    }

    .indicator {
        width: 10px;
        height: 10px;
    }

    .main-container {
        padding: 20px 15px;
    }
}
