/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    height: 100vh;
    background: #050a0f; /* Dark blue-black background */
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* ===== ANIMATED CODE BACKGROUNDS ===== */
/* Left side code background - smaller text, diagonal scroll */
.code-background {
    position: fixed;
    top: 0;
    left: 30%; /* Positioned to right of center content */
    width: 100vw;
    height: 200vh;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    line-height: 1.6;
    color: rgba(120, 200, 255, 0.25); /* Subtle blue transparent text */
    z-index: 1;
    padding: 20px;
    pointer-events: none; /* Don't interfere with user interactions */
    overflow: hidden;
    white-space: pre;
    animation: codeScroll 150s linear infinite;
    filter: blur(1.5px); /* Slight blur for depth effect */
}

/* Animation for left code background - diagonal movement */
@keyframes codeScroll {
    0% { transform: translate(-20%, -20%); }
    100% { transform: translate(-50%, -50%); }
}

/* Right side code background - bigger text, vertical scroll */
.code-background-right {
    position: fixed;
    top: 0;
    right: 0;
    width: 70vw; /* Covers right 70% of viewport */
    height: 200vh;
    font-family: 'Courier New', monospace;
    font-size: 16px; /* Larger text than left side */
    line-height: 1.8;
    color: rgba(100, 180, 255, 0.2); /* Slightly different blue tone */
    z-index: 1;
    padding: 40px;
    pointer-events: none;
    overflow: hidden;
    white-space: pre;
    animation: codeScrollRight 180s linear infinite;
    filter: blur(1px); /* Less blur than left side */
}

/* Animation for right code background - vertical upward movement */
@keyframes codeScrollRight {
    0% { transform: translateY(-20%); }
    100% { transform: translateY(-80%); }
}

/* Gradient overlay for visual depth */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(80, 90, 100, 0.3) 0%, rgba(60, 70, 80, 0.3) 100%);
    z-index: 2;
    pointer-events: none;
}

/* ===== NAVIGATION MENU ===== */
header {
    position: fixed;
    top: 0;
    right: 0;
    padding: 2rem;
    z-index: 1000; /* Above all background elements */
}

.menu {
    display: flex;
    list-style: none;
    gap: 0.8rem; /* Compact spacing between menu items */
}

.menu a {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
}

/* Menu hover effects */
.menu a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Active menu item styling */
.menu a.active {
    background-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ===== MAIN CONTENT LAYOUT ===== */
main {
    flex: 1;
    display: flex;
    align-items: flex-start; /* Changed from center to flex-start */
    justify-content: center;
    padding: 2rem;
    padding-top: 4rem; /* Add specific top padding to position content higher */
    z-index: 3; /* Above background elements but below menu */
    position: relative;
    width: 100%;
    overflow-x: auto; /* Allow horizontal scroll if needed */
}

.central-content {
    text-align: center;
    max-width: 1400px; /* Increased for calendar widget */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 500px; /* Reserve space to prevent layout shifts */
    position: relative;
    width: 100%;
}

/* ===== TEXT CONTENT STYLING ===== */
/* Main company name - fixed position, always visible */
.company-name {
    color: rgba(255, 171, 66, 0.9); /* Warm orange-yellow with 90% opacity - most prominent */
    font-size: 8rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 5px;
    text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.6);
    margin-bottom: 2rem;
    position: absolute; /* Fixed position prevents movement */
    top: 0;
    left: 50%;
    transform: translateX(-50%); /* Perfect horizontal centering */
    flex-shrink: 0;
}

/* Middle dynamic text - changes based on menu selection */
#middle-text {
    color: rgba(255, 171, 66, 0.7); /* Orange-yellow with 70% opacity - medium transparency */
    font-size: 2rem;
    font-weight: 400;
    line-height: 1.4;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.5s ease; /* Smooth transitions between content */
    margin-bottom: 2.5rem; /* Increased space below middle text */
    margin-top: 200px; /* Slightly reduced space below fixed company name */
    height: 4rem; /* Fixed height to prevent movement */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main descriptive text - changes based on menu selection */
#main-text {
    color: rgba(255, 171, 66, 0.6); /* Orange-yellow with 60% opacity - most transparent for subtle effect */
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.4;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.5s ease; /* Smooth transitions */
    max-width: 600px;
    height: 4rem; /* Reduced height for less space */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 1rem; /* Add small margin bottom */
}

/* ===== RESPONSIVE DESIGN FOR MOBILE ===== */
@media (max-width: 768px) {
    /* Mobile body adjustments */
    body {
        overflow-x: hidden; /* Prevent horizontal scroll */
    }
    
    /* Mobile header adjustments */
    header {
        position: static; /* Allow normal document flow on mobile */
        padding: 1rem;
        text-align: center;
    }
    
    /* Mobile menu layout */
    .menu {
        justify-content: center;
        gap: 1rem; /* Touch-friendly spacing */
        flex-wrap: wrap; /* Allow wrapping on very small screens */
    }
    
    .menu a {
        font-size: 1rem;
        padding: 0.5rem 1rem; /* Larger touch targets */
        min-width: 44px; /* iOS accessibility requirement */
        min-height: 44px; /* iOS accessibility requirement */
    }
    
    /* Mobile company name scaling */
    .company-name {
        font-size: 4rem; /* Even smaller for mobile */
        letter-spacing: 2px;
        margin-bottom: 1rem;
        position: relative; /* Change to relative on mobile */
        top: auto;
        left: auto;
        transform: none;
    }
    
    /* Mobile middle text scaling */
    #middle-text {
        font-size: 1.3rem;
        margin-top: 2rem; /* Reduced margin for mobile */
        height: auto; /* Allow natural height on mobile */
        margin-bottom: 1.5rem;
        padding: 0 1rem; /* Side padding for readability */
    }
    
    /* Mobile main text scaling */
    #main-text {
        font-size: 0.9rem;
        height: auto; /* Allow natural height on mobile */
        padding: 0 1rem; /* Side padding for readability */
        line-height: 1.6; /* Better readability */
    }
    
    /* Mobile social icons adjustments */
    .social-icons {
        gap: 1.5rem; /* Adequate touch spacing */
        margin-top: 2rem;
        height: auto; /* Allow natural height on mobile */
    }
    
    /* Mobile code backgrounds - reduce performance impact */
    .code-background,
    .code-background-right {
        display: none; /* Hide animated backgrounds on mobile for better performance */
    }
    
    /* Mobile main content adjustments */
    main {
        padding: 1rem;
        overflow-x: hidden;
    }
    
    .central-content {
        min-height: auto; /* Allow natural height on mobile */
        width: 100%;
        max-width: none;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .company-name {
        font-size: 3rem;
        letter-spacing: 1px;
    }
    
    #middle-text {
        font-size: 1.1rem;
    }
    
    #main-text {
        font-size: 0.8rem;
    }
    
    .menu a {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
    
    .social-icons {
        gap: 1rem;
        flex-wrap: wrap; /* Allow wrapping on very small screens */
    }
}

/* ===== SOCIAL MEDIA ICONS ===== */
/* Container for social icons - only visible in "Who" section */
.social-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.5rem; /* Generous spacing between icons */
    margin-top: 3rem; /* Distance from text above */
    transition: opacity 0.5s ease; /* Only animate opacity, not display */
    height: 100px; /* Fixed height always reserved */
    visibility: hidden; /* Use visibility instead of display to maintain space */
    opacity: 0;
}

/* Base styling for all social icons */
.social-icon {
    transition: all 0.3s ease;
    opacity: 0.8; /* Slightly transparent by default */
}

/* Hover effect for all social icons */
.social-icon:hover {
    opacity: 1; /* Full opacity on hover */
    transform: translateY(-2px); /* Subtle lift effect */
}

/* YouTube icon - red color scheme */
.social-icon.youtube {
    color: #ff0000; /* YouTube red */
}

.social-icon.youtube:hover {
    color: #ff3333; /* Lighter red on hover */
}

/* LinkedIn icon - blue color scheme */
.social-icon.linkedin {
    color: #0077b5; /* LinkedIn blue */
}

.social-icon.linkedin:hover {
    color: #0099d4; /* Lighter blue on hover */
}

/* IMDB icon - yellow color scheme */
.social-icon.imdb {
    color: #f5c518; /* IMDB yellow */
}

.social-icon.imdb:hover {
    color: #ffdd44; /* Lighter yellow on hover */
}

.code-background-right {
    position: fixed;
    top: 0;
    right: 0;
    width: 70vw;
    height: 200vh;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    line-height: 1.8;
    color: rgba(100, 180, 255, 0.2);
    z-index: 1;
    padding: 40px;
    pointer-events: none;
    overflow: hidden;
    white-space: pre;
    animation: codeScrollRight 180s linear infinite;
    filter: blur(1px);
}

@keyframes codeScrollRight {
    0% { transform: translateY(-20%); }
    100% { transform: translateY(-80%); }
}

/* ===== CALENDAR BOOKING SYSTEM ===== */
/* Container for calendar booking - only visible in "Contacts" section */
.calendar-booking {
    display: none;
    width: 100%;
    max-width: 1200px;
    margin: 0.5rem auto 0 auto; /* Reduced top margin to move closer to text */
    gap: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease;
    justify-self: center; /* Center within flex container */
    align-self: flex-start; /* Align to top instead of center */
}

.calendar-booking.active {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    opacity: 1;
    visibility: visible;
    justify-content: center;
    align-content: start;
}

/* Calendar container styling */
.calendar-container {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 171, 66, 0.3);
    border-radius: 10px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

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

.calendar-header h3 {
    color: rgba(255, 171, 66, 0.9);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.nav-btn {
    background: rgba(255, 171, 66, 0.2);
    border: 1px solid rgba(255, 171, 66, 0.4);
    color: rgba(255, 171, 66, 0.9);
    padding: 0.5rem 0.8rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: rgba(255, 171, 66, 0.3);
    transform: translateY(-1px);
}

/* Calendar grid */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: rgba(255, 171, 66, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.day-header {
    background: rgba(255, 171, 66, 0.2);
    color: rgba(255, 171, 66, 0.9);
    padding: 0.5rem;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
}

.calendar-day {
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.7);
    padding: 0.8rem 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-day:hover {
    background: rgba(255, 171, 66, 0.1);
    color: rgba(255, 171, 66, 0.9);
}

.calendar-day.available {
    background: rgba(100, 255, 100, 0.1);
    color: rgba(100, 255, 100, 0.9);
}

.calendar-day.available:hover {
    background: rgba(100, 255, 100, 0.2);
}

.calendar-day.selected {
    background: rgba(255, 171, 66, 0.4);
    color: rgba(255, 171, 66, 1);
    font-weight: bold;
}

.calendar-day.unavailable {
    background: rgba(255, 100, 100, 0.1);
    color: rgba(255, 100, 100, 0.5);
    cursor: not-allowed;
}

.calendar-day.other-month {
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
}

/* Time slots styling */
.time-slots {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 171, 66, 0.3);
    border-radius: 10px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.time-slots h4 {
    color: rgba(255, 171, 66, 0.9);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
}

.time-slot-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
}

.time-slot {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 171, 66, 0.3);
    color: rgba(255, 255, 255, 0.8);
    padding: 0.8rem;
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.time-slot:hover {
    background: rgba(255, 171, 66, 0.1);
    color: rgba(255, 171, 66, 0.9);
    transform: translateY(-1px);
}

.time-slot.selected {
    background: rgba(255, 171, 66, 0.3);
    color: rgba(255, 171, 66, 1);
    font-weight: bold;
    border-color: rgba(255, 171, 66, 0.6);
}

.time-slot.unavailable {
    background: rgba(255, 100, 100, 0.1);
    color: rgba(255, 100, 100, 0.5);
    cursor: not-allowed;
}

/* Booking form styling */
.booking-form {
    grid-column: 1 / -1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 171, 66, 0.3);
    border-radius: 10px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.booking-form h3 {
    color: rgba(255, 171, 66, 0.9);
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    text-align: center;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr 1.5fr; /* Name, Surname, Company, Email */
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-row .form-group {
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 171, 66, 0.3);
    border-radius: 5px;
    padding: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(255, 171, 66, 0.6);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 10px rgba(255, 171, 66, 0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.selected-date-time {
    background: rgba(255, 171, 66, 0.1);
    border: 1px solid rgba(255, 171, 66, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin: 1.5rem 0;
}

.selected-date-time p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0.3rem 0;
    font-size: 0.9rem;
}

.selected-date-time span {
    color: rgba(255, 171, 66, 0.9);
    font-weight: 600;
}

#book-appointment {
    width: 100%;
    background: linear-gradient(135deg, rgba(255, 171, 66, 0.8), rgba(255, 171, 66, 1));
    border: none;
    color: #050a0f;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#book-appointment:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(255, 171, 66, 1), rgba(255, 200, 100, 1));
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 171, 66, 0.3);
}

#book-appointment:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Mobile responsive design for calendar booking */
@media (max-width: 768px) {
    .central-content {
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .calendar-booking {
        max-width: 100%;
        margin: 1rem auto 0 auto;
    }
    
    .calendar-booking.active {
        display: block;
        grid-template-columns: none;
        grid-template-rows: none;
        gap: 1.5rem;
        justify-content: center;
        align-content: center;
    }
    
    .calendar-container,
    .time-slots,
    .booking-form {
        margin-bottom: 1.5rem;
        width: 100%;
        box-sizing: border-box;
    }
    
    .time-slot-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }
    
    .calendar-grid {
        gap: 2px;
    }
    
    .calendar-day {
        padding: 0.6rem 0.3rem;
        min-height: 40px;
        font-size: 0.9rem;
    }
    
    .time-slot {
        padding: 0.6rem;
        font-size: 0.8rem;
    }
    
    .booking-form {
        padding: 1.5rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.7rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .form-row .form-group {
        margin-bottom: 1rem;
    }
}