/* ====================================
   Welcome Section Styles
==================================== */
.right-image {
    flex: 1;
    background: url('../media/images/nosotros-welcome-img.jpg') no-repeat top center/cover; /* Center the background image */
    border-radius: 15px; /* More rounded corners */
    height: 450px; /* Slightly increased height */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); /* Increased shadow */
}

/* ====================================
   Historia Section Styles
==================================== */
#historia {
    width: 100%; /* Full width */
    padding: 50px 20px; /* Padding around section */
    background: linear-gradient(to bottom, #60AFFF, #60AFFF); 
    color: #FFFFFF; /* White text color */
    text-align: center; /* Center text alignment */
    overflow: hidden; /* Hide overflow content */
}

/* Timeline Styles */
.timeline-item {
    display: flex; /* Flexbox for layout */
    flex-direction: row; /* Row direction */
    justify-content: space-between; /* Space between items */
    align-items: center; /* Center items vertically */
    margin-bottom: 50px; /* Space below item */
    padding: 20px; /* Padding around item */
    background: #2C302E;
    border-radius: 10px; /* Rounded corners */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3); /* Shadow for depth */
    animation: fadeIn 1s ease-in-out; /* Fade in animation */
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse; /* Reverse direction for even items */
}

.timeline-content {
    width: 60%; /* Content width */
    padding: 20px; /* Padding around content */
    display: flex; /* Flexbox for layout */
    flex-direction: column; /* Column direction */
    justify-content: center; /* Center content vertically */
    border-radius: 10px; /* Rounded corners */
}

.timeline-content h3 {
    font-size: 2rem; /* Large font size */
    margin-bottom: 10px; /* Space below heading */
    color: #F7B801;
}

.timeline-content p {
    font-size: 1.2rem; /* Medium font size */
    line-height: 1.8; /* Line height */
}

.timeline-image {
    width: 35%; /* Image container width */
    height: 250px; /* Fixed height for carousel images */
    display: flex; /* Flexbox for layout */
    justify-content: center; /* Center content horizontally */
    align-items: center; /* Center content vertically */
    overflow: hidden; /* Hide overflow content */
    border-radius: 10px; /* Rounded corners */
}

.timeline-image img {
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    object-fit: cover; /* Cover the container */
    border-radius: 10px; /* Rounded corners */
}

/* ====================================
   Pastor Section Styles
==================================== */
#pastor {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    background: linear-gradient(to bottom, #AFD7FF,#60AFFF);
}

.pastor-content {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    width: 100%; /* Ensure full width */
    margin: 0 auto;
    padding: 20px; /* Padding around content */
    background: linear-gradient(to top, #ffffff20,#00000020); /* Semi-transparent background */
    border-radius: 10px; /* Rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}

.pastor-wrapper {
    display: flex;
    align-items: center;
}

.pastor-image {
    flex: 1;
    border-radius: 15px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden; /* Ensure the image doesn't overflow the container */
    height: 100%; /* Ensure the image container takes full height */
    display: flex; /* Use flexbox to center the image */
    align-items: center; /* Center image vertically */
}

.pastor-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensure the image covers the container */
    border-radius: 15px;
}

.pastor-details {
    flex: 2;
    padding: 2rem;
    text-align: center; /* Center text alignment */
}

.pastor-details p {
    font-size: 1.25rem;
    color: #FFFFFF;
    line-height: 1.8;
    text-align: center; /* Center paragraph text alignment */
}

/* ====================================
   Team Section Styles
==================================== */
#equipo {
    height: 100%;
    width: 100%;
    padding: 50px 0;
    background: linear-gradient(to bottom, #60AFFF, #778DA9);
    text-align: center;
    overflow: hidden;
}

.team-container-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 100%;
    height: calc(100vh - 190px); /* Adjust height to fit within full screen minus padding */
    margin: 0 auto;
    overflow: hidden; /* Hide overflow to keep the buttons hidden initially */
    cursor: grab; /* Change cursor to grab */
}

.team-container-wrapper:active {
    cursor: grabbing; /* Change cursor to grabbing while active */
}

.team-container {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto; /* Enable horizontal scrolling */
    gap: 20px;
    height: 100%;
    padding-bottom: 10px;
    scroll-behavior: smooth; /* Smooth scrolling */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
    scrollbar-width: none; /* Firefox */
}

.team-container::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Webkit browsers */
}

.team-member {
    background: linear-gradient(to bottom, #FF8552, #778DA9);
    color: #000000;
    text-align: center;
    padding: 20px;
    border-radius: 10px; /* Add slight rounding to the text container */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 350px; /* Adjusted width for text container */
    flex: 0 0 auto; /* Ensure flex items don't shrink or grow */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.team-member img {
    width: 250px; /* Adjusted width for image */
    height: 250px; /* Adjusted height for image */
    border-radius: 50%; /* Make the image circular */
    margin-bottom: 20px; /* Space below image */
    object-fit: cover; /* Ensure the image covers the container */
    pointer-events: none; /* Prevent grabbing of images */
}

.team-member h3 {
    font-size: 1.2rem; /* Increased font size */
    margin-bottom: 10px;
    color: #F7B32B;
}

.team-member p {
    font-size: 1rem; /* Increased font size */
    color: #FFFFFF;
}

/* Scroll Buttons */
.scroll-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #FE5F55; /* Primary color */
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff; /* White icon color */
    font-size: 1.5rem; /* Icon size */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    transition: background 0.3s ease, transform 0.3s ease, opacity 0.3s ease; /* Smooth transition */
    opacity: 1; /* Fully visible by default */
}

.scroll-button:hover {
    background: #495867; /* Darker primary color on hover */
    transform: translateY(-50%) scale(1.1); /* Slightly enlarge on hover */
}

.scroll-button.hidden {
    opacity: 0; /* Fade out when hidden */
    pointer-events: none; /* Prevent interaction when hidden */
}

.left-button {
    left: 10px;
}

.right-button {
    right: 10px;
}

/* Prevent text highlighting when grabbing and scrolling */
.team-container-wrapper,
.team-container-wrapper * {
    user-select: none; /* Disable text selection */
}

/* ====================================
   Mision Section Styles
==================================== */
#mision {
    position: relative; /* Position relative for absolute positioning of children */
    width: 100%; /* Full width */
    height: 100vh; /* Full screen height */
    display: flex; /* Flexbox for centering content */
    align-items: center; /* Center items vertically */
    justify-content: center; /* Center items horizontally */
    background: url('../media/images/nosotros-images/mision.webp') no-repeat center center fixed; /* Parallax background */
    background-size: cover; /* Cover entire section with background image */
    overflow: hidden; /* Hide overflow content */
}

.mision-overlay {
    position: absolute; /* Position absolute for overlay */
    top: 0; /* Start at top */
    left: 0; /* Start at left */
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    background: linear-gradient(to bottom, #8F95D3, #60afffb3);
    z-index: 1; /* Place above background */
}

.content-container {
    position: relative; /* Position relative */
    z-index: 2; /* Place above overlay */
    max-width: 1200px; /* Maximum width */
    margin: 0 auto; /* Center horizontally */
    padding: 40px 20px; /* Padding around content */
}

.mision-content {
    text-align: center; /* Center align text */
}

.mision-text {
    font-size: 1.2rem; /* Medium font size */
    line-height: 1.8; /* Line height */
    margin-bottom: 20px; /* Space below text */
    color: #FFFFFF; /* White text color */
}

/* ====================================
   Declaración Doctrinal Section Styles
==================================== */
#doctrina {
    position: relative;
    width: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: linear-gradient(to bottom,#778DA9,#8F95D3);
    text-align: center;
    overflow: hidden;
}

.doctrina-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

.doctrina-item {
    background: #778DA9;
    color: #FFFFFF;
    font-size: 1.2rem;
    line-height: 1.8;
    padding: 15px 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: calc(45% - 10px); /* Adjusted width to fit two items per row */
    margin: 10px; /* Space between items */
}

.doctrina-item:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* ====================================
   Responsive Styles
==================================== */
@media (min-width: 769px) {
    .break-text {
        display: inline-block;
        width: 100%;
    }
}

@media (max-width: 768px) {
    /* Timeline Section Responsive Styles */
    .timeline-item {
        flex-direction: column; /* Column direction on mobile */
    }

    .timeline-item:nth-child(even) {
        flex-direction: column-reverse; /* Reverse direction for even items */
    }

    .timeline-content, .timeline-image {
        width: 100%; /* Full width on mobile */
    }

    .timeline-content {
        text-align: left; /* Left-align text */
    }

    .timeline-image {
        height: 200px; /* Adjusted height for mobile */
    }

    /* Pastor Section Responsive Styles */

    #pastor {
        display: block;
    }
    
    .pastor-content {
        flex-direction: column-reverse; /* Stack content vertically */
        padding: 20px; /* Padding around content */
    }

    .pastor-wrapper {
        flex-direction: column-reverse; /* Stack content vertically */
        gap: 1rem; /* Reduce gap */
    }

    .pastor-image, .pastor-details {
        width: 100%; /* Full width on mobile */
        height: auto; /* Adjust height */
    }

    .pastor-details p {
        font-size: 1rem; /* Adjust font size for mobile */
    }

    /*team section responsive styles */
    .team-member {
        width: 300px; /* Adjust width for mobile */
    }

    .team-member img {
        width: 220px; /* Adjust image size for mobile */
        height: 220px; /* Adjust image size for mobile */
    }

    .scroll-button {
        width: 40px;
        height: 40px;
    }

    /* Mision Section Responsive Styles */
    #mision {
        flex-direction: column;
        background-attachment: scroll; /* Changed from fixed to scroll */
        background-size: cover; /* Cover the container */
        }
    .content-container {
        padding: 20px 10px; /* Adjust padding for mobile */
    }

    .mision-text {
        font-size: 1rem; /* Adjust font size for mobile */
    }

    /* Declaración Doctrinal Section Responsive Styles */

    .doctrina-item {
        font-size: 1rem; /* Adjust font size for mobile */
        padding: 10px 20px; /* Adjust padding for mobile */
        width: 100%; /* Full width on mobile */
    }
}
