/* Isabella Font Declaration */
@font-face {
    font-family: 'Isabella';
    src: url('../fonts/Isabella.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Isabella';
    src: url('../../fonts/Isabella.ttf') format('truetype');
}

.welcome-title {
    font-family: 'Isabella', sans-serif;
    color: yellow;
    font-size: 3em;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    background: rgba(0, 0, 0, 0.05);
    padding: 0.5em 1em;
    border-radius: 15px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 0, 0.1);
    margin-bottom: 1em;
}

#explore-button {
    font-family: 'Isabella', sans-serif;
    background: rgba(255, 0, 0, 0.2);
    color: yellow;
    margin-top: 20px;
    padding: 1em 2em;
    border: 2px solid rgba(255, 255, 0, 0.4);
    border-radius: 10px;
    font-size: 1.2em;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

#explore-button:hover {
    background: rgba(255, 0, 0, 0.3);
    border-color: rgba(255, 255, 0, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* Screens */
.screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-direction: column;
    z-index: 10;
}

.screen.active {
    display: flex;
}

#parallax-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-color: black;
}

.parallax-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: opacity 1.5s ease-in-out;
}

#parallax-bg-a {
    z-index: 2;
}

#parallax-bg-b {
    z-index: 1;
    opacity: 0;
}

/* Hide unused parallax divs (but NOT parallax-bg-b which is used for crossfade) */
#parallax-mid-a, #parallax-mid-b, #parallax-fg-a, #parallax-fg-b {
    display: none;
}

/* Content Carousel */
#content-carousel {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 10;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2em;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    pointer-events: none;
    box-sizing: border-box;
    padding-bottom: 100px; /* Ensure slides don't get cut off */
}

.slide.active {
    opacity: 1;
    pointer-events: auto;
}

.slide h2 {
    font-family: 'Isabella', sans-serif;
    margin-bottom: 1em;
    text-align: center;
    color: yellow;
    font-size: 2.5em;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    background: rgba(0, 0, 0, 0.05);
    padding: 0.5em 1em;
    border-radius: 10px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 0, 0.1);
    display: inline-block;
}

/* Content Container - Properly Centered */
.content-container {
    background-color: rgba(255, 0, 0, 0.1);
    color: yellow;
    padding: 2em 2em 2em 2em;
    border-radius: 10px;
    max-width: 50%;
    max-height: 60%;
    overflow-y: auto;
    text-align: left;
    margin: 0 auto;
    display: block;
    word-wrap: break-word;
    box-sizing: border-box;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 0, 0.3);
    line-height: 1.6;
}

/* Custom Scrollbar */
.content-container::-webkit-scrollbar {
    width: 12px;
}

.content-container::-webkit-scrollbar-track {
    background: rgba(0, 100, 255, 0.2);
    border-radius: 10px;
}

.content-container::-webkit-scrollbar-thumb {
    background-color: #00008b;
    border-radius: 10px;
    border: 3px solid transparent;
    background-clip: content-box;
}

/* Navigation */
.carousel-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    padding: 1em;
    cursor: pointer;
    z-index: 20;
    font-size: 1.2em;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.carousel-arrow:hover {
    background: rgba(0,0,0,0.9);
}

.prev { left: 1em; }
.next { right: 1em; }

.carousel-dots {
    position: absolute;
    bottom: 2em;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
}

.dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    margin: 0 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot.active { 
    background: #f28a8a; 
}

.dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* YouTube Button and Modal */
#youtube-button {
    position: fixed;
    bottom: 2em;
    right: 2em;
    z-index: 100;
    background: rgba(255, 0, 0, 0.3);
    border-radius: 50px;
    padding: 1em;
    backdrop-filter: blur(5px);
    border: 2px solid rgba(255, 0, 0, 0.5);
    transition: all 0.3s ease;
}

#youtube-button:hover {
    background: rgba(255, 0, 0, 0.5);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.4);
}

.youtube-link {
    display: flex;
    align-items: center;
    gap: 0.5em;
    color: #fff;
    text-decoration: none;
    font-size: 1.2em;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

.youtube-link i {
    font-size: 1.5em;
    color: #ff0000;
}

.youtube-text {
    color: yellow;
    font-family: 'Isabella', sans-serif;
    font-size: 1em;
    letter-spacing: 1px;
}

/* Hide text on smaller screens, show only icon */
@media (max-width: 768px) {
    .youtube-text {
        display: none;
    }
    
    #youtube-button {
        padding: 0.8em;
    }
    
    .youtube-link {
        font-size: 1.5em;
    }
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    position: relative;
    margin: 5% auto;
    padding: 0;
    width: 90%;
    height: 80%;
    max-width: 1200px;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

.close-button {
    color: #fff;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    position: absolute;
    top: 10px;
    right: 15px;
    z-index: 1001;
    background: rgba(0,0,0,0.7);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-button:hover,
.close-button:focus {
    color: #ff0000;
    text-decoration: none;
}

#youtube-iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
}

/* CTA Screen Styling */
#cta-screen .content-container {
    background-color: rgba(255, 0, 0, 0.15);
    padding: 3em;
    max-width: 60%;
}

#cta-screen h2 {
    font-family: 'Isabella', sans-serif;
    color: yellow;
    font-size: 2.5em;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    background: rgba(0, 0, 0, 0.05);
    padding: 0.5em 1em;
    border-radius: 10px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 0, 0.1);
    display: inline-block;
    margin-bottom: 1em;
    /* ADDED: Position header outside content container */
    position: relative;
    z-index: 15;
}

/* ADDED: Remove h2 styling from within content container */
#cta-screen .content-container h2 {
    background: none;
    border: none;
    padding: 0;
    margin-bottom: 1em;
    font-size: 2.5em;
    backdrop-filter: none;
}

#cta-screen p {
    color: yellow;
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 2em;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

/* Form Styling */
#signup-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1em;
}

#email {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 0, 0.3);
    border-radius: 10px;
    padding: 1em 1.5em;
    color: yellow;
    font-size: 1.1em;
    width: 300px;
    backdrop-filter: blur(5px);
    text-align: center;
}

#email::placeholder {
    color: rgba(255, 255, 0, 0.6);
    font-style: italic;
}

#email:focus {
    outline: none;
    border-color: rgba(255, 255, 0, 0.6);
    box-shadow: 0 0 10px rgba(255, 255, 0, 0.3);
}

input[type="submit"] {
    background: rgba(255, 0, 0, 0.2);
    color: yellow;
    border: 2px solid rgba(255, 255, 0, 0.4);
    border-radius: 10px;
    padding: 1em 2em;
    font-size: 1.2em;
    font-family: 'Isabella', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
    letter-spacing: 1px;
}

input[type="submit"]:hover {
    background: rgba(255, 0, 0, 0.3);
    border-color: rgba(255, 255, 0, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .content-container {
        max-width: 85%;
        max-height: 70%;
        padding: 1.5em 1.5em 1.5em 1.5em; /* Extra bottom padding on mobile */
    }
    
    .slide {
        padding: 1em;
    }
    
    .slide h2 {
        font-size: 2em;
    }
    
    #explore-button {
        padding: 0.8em 1.5em;
        font-size: 1em;
    }
    
    /* NEW RESPONSIVE RULES */
    .welcome-title {
        font-size: 2.2em;
        padding: 0.4em 0.8em;

    }
    
    #email {
        width: 250px;
        font-size: 1em;
        padding: 0.8em 1.2em;
    }
    
    #cta-screen .content-container {
        max-width: 90%;
        padding: 2em 2em 2em 2em;
    }
    
    .carousel-arrow {
        padding: 0.8em;
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .content-container {
        max-width: 95%;
        max-height: 50%;
        padding: 1em;
    }
    
    .slide h2 {
        font-size: 1.5em;
    }
    
    /* NEW RESPONSIVE RULES */
    .welcome-title {
        font-size: 1.8em;
        padding: 0.3em 0.6em;
    }
    
    #email {
        width: 200px;
        font-size: 0.9em;
    }
    
    #signup-form {
        gap: 0.8em;
    }
}

/* YouTube Button Smart Visibility */
#youtube-button {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease-in-out;
    pointer-events: none;
}

#youtube-button.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Back to Welcome Button */
#back-to-welcome-button {
    position: fixed;
    top: 50%;
    left: 1em;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    padding: 1em;
    cursor: pointer;
    z-index: 20;
    font-size: 1.2em;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    display: none;
}

#back-to-welcome-button:hover {
    background: rgba(0,0,0,0.9);
}

/* Mobile responsive for back button */
@media (max-width: 768px) {
    #back-to-welcome-button {
        padding: 0.8em;
        font-size: 1em;
    }
}

/* NEW: Enhanced text formatting within content containers */
.content-container p {
    margin-bottom: 1.2em;
    line-height: 1.7;
}

.content-container p:last-child {
    margin-bottom: 0;
}

.content-container strong {
    font-weight: bold;
    color: #ffff99; /* Slightly brighter yellow for emphasis */
}

.content-container br {
    line-height: 1.8;
}

/* Handle theological analysis formatting */
.content-container p:first-child {
    margin-top: 0;
}

#footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    pointer-events: none;
}

#footer ul.copyright {
    text-align: center;
    margin: 0;
    padding: 5px;
    font-family: 'Isabella', serif;
    font-size: 1em;
    letter-spacing: 1px;
    font-weight: bold;
    color: #33eaff78;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

#footer ul.copyright + ul.copyright {
    margin-top: -30px;
}

#footer ul.copyright li {
    display: inline-block;
    margin: 0;
    list-style: none;
}

#footer ul.copyright a {
    pointer-events: auto;
    color: #ff3e33bd;
    text-decoration: none;
    font-weight: bold;
}

#footer ul.copyright a:hover {
    color: #ff6666;
    text-decoration: underline;
}