/* ===== EVENTSPACE - ALGORITM BRAND ===== */

:root {
    --teal: #4a8a9e;
    --teal-light: #5fa3b8;
    --indigo: #2c3e50;
    --dark-char: #1a1a1a;
    --warm-beige: #c9a876;
    --white: #ffffff;
    --text-dark: #2c3e50;
    --text-light: #f5f5f5;
    --text-muted: #7a8a9a;
    --bg-light: #f8f7f4;
    --transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-fast: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html, body {
    width: 100%;
    overflow-x: hidden !important;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #fafaf8 0%, #f5f3f0 100%) !important;
    background-attachment: fixed !important;
}

#eventspace-app {
    width: 100%;
    overflow-x: hidden;
    background: transparent;
    color: var(--text-dark);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
}

/* ===== TYPOGRAPHY ===== */
#eventspace-app h1, #eventspace-app h2, #eventspace-app h3, #eventspace-app h4 {
    font-family: 'GT America', 'Space Grotesk', sans-serif;
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.1;
    color: var(--text-dark);
}

#eventspace-app h1 {
    font-size: clamp(2.5rem, 8vw, 5.5rem);
    color: var(--teal);
}

#eventspace-app h2 {
    font-size: clamp(2rem, 5vw, 3.8rem);
    margin-bottom: 3.5rem;
    text-align: center;
    color: var(--teal);
}

#eventspace-app h3 {
    font-size: 1.5rem;
    color: var(--teal);
}

#eventspace-app p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-muted);
}

/* ===== NAVBAR ===== */
.esp-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--white);
    border-bottom: 2px solid var(--teal);
    padding: 1.2rem 3rem;
    width: 100%;
    transition: var(--transition-fast);
    box-shadow: 0 4px 12px rgba(74, 138, 158, 0.08);
}

.esp-navbar.scrolled {
    background: var(--white);
    border-bottom-color: var(--teal);
    padding: 0.8rem 3rem;
}

.esp-navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 3rem;
}

.esp-navbar-brand {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--teal);
    text-decoration: none;
    letter-spacing: -1px;
    white-space: nowrap;
}

.esp-navbar-menu {
    display: flex;
    gap: 3.5rem;
    align-items: center;
    flex: 1;
}

.esp-nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    position: relative;
    transition: var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.esp-nav-link::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--teal);
    transition: var(--transition-fast);
}

.esp-nav-link:hover {
    color: var(--teal);
}

.esp-nav-link:hover::after {
    width: 100%;
}

.esp-navbar-buttons {
    display: flex;
    gap: 1rem;
    margin-left: auto;
}

/* ===== BUTTONS ===== */
button, input[type="button"], input[type="submit"] {
    background: none;
    border: none;
    padding: 0;
}

.esp-btn {
    padding: 14px 32px;
    border-radius: 8px;
    border: 2px solid;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.esp-btn-small {
    padding: 10px 22px;
    font-size: 0.85rem;
    border-radius: 8px;
}

.esp-btn-primary {
    background: var(--teal) !important;
    color: var(--white) !important;
    border-color: var(--teal) !important;
    box-shadow: 0 4px 12px rgba(74, 138, 158, 0.3) !important;
}

.esp-btn-primary:hover {
    background: var(--teal-light) !important;
    border-color: var(--teal-light) !important;
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 20px rgba(74, 138, 158, 0.4) !important;
}

.esp-btn-secondary {
    background: transparent !important;
    color: var(--teal) !important;
    border-color: var(--teal) !important;
}

.esp-btn-secondary:hover {
    background: rgba(74, 138, 158, 0.08) !important;
    transform: translateY(-2px) !important;
}

.esp-btn-icon {
    background: transparent !important;
    color: var(--teal) !important;
    border: 2px solid var(--teal) !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-size: 1.2rem !important;
    transition: var(--transition-fast) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 700 !important;
}

.esp-btn-icon:hover {
    background: rgba(74, 138, 158, 0.1) !important;
    border-color: var(--teal-light) !important;
    transform: scale(1.08) !important;
}

/* ===== HERO ===== */
.esp-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 80px 3rem;
    overflow: hidden;
    width: 100%;
    background: linear-gradient(135deg, #ffffff 0%, #f8f6f3 100%);
}

.esp-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(74, 138, 158, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(201, 168, 118, 0.05) 0%, transparent 50%);
    z-index: 0;
    pointer-events: none;
}

.esp-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 1000px;
}

.esp-hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    animation: slideUp 0.8s ease-out 0.3s both;
    line-height: 1.9;
}

.esp-hero-features {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: slideUp 0.8s ease-out 0.5s both;
}

.esp-feature {
    padding: 1.5rem 2.5rem;
    background: var(--white);
    border: 2px solid var(--teal);
    border-radius: 8px;
    font-weight: 700;
    color: var(--teal);
    font-size: 0.95rem;
    transition: var(--transition-fast);
    box-shadow: 0 4px 12px rgba(74, 138, 158, 0.1);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.esp-feature:hover {
    background: rgba(74, 138, 158, 0.05);
    border-color: var(--teal-light);
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(74, 138, 158, 0.2);
}

/* ===== SECTIONS ===== */
#eventspace-app section {
    padding: 6rem 3rem;
    position: relative;
    width: 100%;
    margin: 0;
    overflow-x: hidden;
}

#eventspace-app section:nth-child(even) {
    background: rgba(74, 138, 158, 0.02);
}

/* ===== GALLERY SECTION ===== */
.esp-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.esp-gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
    animation: slideUp 0.6s ease-out forwards;
    border: 3px solid var(--teal);
}

.esp-gallery-item:nth-child(1) { animation-delay: 0.1s; }
.esp-gallery-item:nth-child(2) { animation-delay: 0.2s; }
.esp-gallery-item:nth-child(3) { animation-delay: 0.3s; }
.esp-gallery-item:nth-child(4) { animation-delay: 0.4s; }

.esp-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.esp-gallery-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(74, 138, 158, 0.2);
    opacity: 0;
    transition: var(--transition);
    z-index: 2;
}

.esp-gallery-item:hover::before {
    opacity: 1;
}

.esp-gallery-item:hover img {
    transform: scale(1.15) rotate(2deg);
}

.esp-gallery-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 2rem;
    z-index: 3;
    background: linear-gradient(180deg, transparent 0%, rgba(26, 26, 26, 0.9) 100%);
    color: var(--white);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* ===== CALENDAR ===== */
.esp-calendar-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 4rem;
}

@media (max-width: 1024px) {
    .esp-calendar-wrapper {
        grid-template-columns: 1fr;
    }
}

.esp-calendar {
    background: var(--white);
    border: 2px solid var(--teal);
    border-radius: 12px;
    padding: 2.5rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(74, 138, 158, 0.1);
}

.esp-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.esp-calendar-header h3 {
    flex: 1;
    text-align: center;
    margin: 0;
}

.esp-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.esp-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.esp-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--teal);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
    font-weight: 600;
    font-size: 0.95rem;
    background: var(--white);
    color: var(--text-dark);
}

.esp-day:hover {
    background: rgba(74, 138, 158, 0.1);
    border-color: var(--teal-light);
    transform: scale(1.08);
}

.esp-day.esp-today {
    background: var(--teal);
    border-color: var(--teal);
    font-weight: 800;
    color: var(--white);
    box-shadow: 0 0 12px rgba(74, 138, 158, 0.3);
}

.esp-day.esp-has-events {
    background: rgba(74, 138, 158, 0.15);
    color: var(--teal);
    border-color: var(--teal);
}

.esp-day.esp-selected {
    background: var(--teal-light);
    color: var(--white);
    border-color: var(--teal-light);
    font-weight: 800;
    box-shadow: 0 0 20px rgba(95, 163, 184, 0.5);
}

.esp-events-panel {
    background: var(--white);
    border: 2px solid var(--teal);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 4px 12px rgba(74, 138, 158, 0.1);
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 500px;
}

.esp-events-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1rem;
    min-height: 100px;
    max-height: 200px;
    overflow-y: auto;
}

.esp-event-item {
    background: rgba(74, 138, 158, 0.08);
    border: 2px solid var(--teal);
    border-radius: 8px;
    padding: 1.5rem;
    transition: var(--transition-fast);
}

.esp-event-item:hover {
    background: rgba(74, 138, 158, 0.15);
    border-color: var(--teal-light);
    transform: translateX(8px);
}

.esp-event-item h4 {
    color: var(--teal);
    margin-bottom: 0.5rem;
}

.esp-event-item p {
    font-size: 0.9rem;
    margin: 0.3rem 0;
}

.esp-events-actions {
    display: flex;
    gap: 1.2rem;
    flex-direction: column;
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 3px solid var(--teal);
    width: 100%;
}

.esp-events-actions .esp-btn,
.esp-events-actions button {
    width: 100% !important;
    padding: 14px 24px !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    display: block !important;
}

#esp-event-select {
    width: 100% !important;
    padding: 12px 14px !important;
    border: 2px solid var(--teal) !important;
    border-radius: 8px !important;
    background: var(--white) !important;
    color: var(--text-dark) !important;
    cursor: pointer !important;
    font-weight: 600 !important;
    display: block !important;
}

/* ===== MODALS ===== */
.esp-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.esp-modal.active {
    display: flex;
}

.esp-modal-content {
    background: var(--white);
    border: 2px solid var(--teal);
    border-radius: 12px;
    padding: 2.5rem;
    max-width: 550px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.esp-modal-large {
    max-width: 750px;
}

.esp-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--teal);
}

.esp-modal-header h2 {
    margin: 0;
    text-align: left;
}

.esp-modal-close {
    background: transparent;
    border: 2px solid var(--teal);
    color: var(--teal);
    font-size: 1.8rem;
    cursor: pointer;
    transition: var(--transition-fast);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.esp-modal-close:hover {
    background: rgba(74, 138, 158, 0.1);
}

/* ===== FORMS ===== */
.esp-form-group {
    margin-bottom: 1.5rem;
}

.esp-form-group label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.esp-form-group input,
.esp-form-group textarea,
.esp-form-group select {
    width: 100%;
    background: var(--white);
    border: 2px solid var(--teal);
    color: var(--text-dark);
    padding: 12px 14px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: var(--transition-fast);
}

.esp-form-group input::placeholder,
.esp-form-group textarea::placeholder {
    color: var(--text-muted);
}

.esp-form-group input:focus,
.esp-form-group textarea:focus,
.esp-form-group select:focus {
    outline: none;
    background: rgba(74, 138, 158, 0.05);
    border-color: var(--teal-light);
    box-shadow: 0 0 12px rgba(74, 138, 158, 0.2);
}

/* ===== FOOTER ===== */
.esp-footer {
    background: linear-gradient(180deg, rgba(245, 243, 240, 0.5) 0%, rgba(248, 247, 244, 0.8) 100%);
    border-top: 2px solid var(--teal);
    padding: 4rem 3rem 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    width: 100%;
    margin: 0;
}

/* ===== ANIMATIONS ===== */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .esp-navbar {
        padding: 1rem 1.5rem;
    }

    .esp-navbar-content {
        gap: 1.5rem;
    }

    .esp-navbar-menu {
        gap: 1rem;
        flex-direction: column;
    }

    #eventspace-app section {
        padding: 4rem 1.5rem;
    }

    .esp-hero {
        padding: 60px 1.5rem;
    }

    .esp-gallery-grid {
        grid-template-columns: 1fr;
    }

    .esp-calendar-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .esp-navbar {
        padding: 0.8rem 1rem;
    }

    .esp-navbar-menu {
        display: none;
    }

    #eventspace-app section {
        padding: 3rem 1rem;
    }

    #eventspace-app h1 {
        font-size: 1.8rem;
    }

    #eventspace-app h2 {
        font-size: 1.4rem;
    }
}
