/* General Body and Typography */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f8f8; /* Light background */
    color: #333;
    line-height: 1.6;
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px; /* Wider container for more spacious feel */
    margin: 0 auto;
    padding: 0 25px; /* More horizontal padding */
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 700;
}

p {
    margin-bottom: 10px;
    color: #555;
}

/* Navigation Bar */
.main-nav {
    background-color: #ffffff; /* White background for nav */
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: flex-start; /* Align items to the start (left) */
    align-items: center;
}

.app-logo {
    max-width: 150px; /* Smaller logo for top-left */
    height: auto;
    animation: fadeIn 1s ease-out;
    margin-bottom: 0; /* Remove margin-bottom from previous context */
}

.top-right-nav {
    display: flex;
    align-items: center;
    gap: 20px; /* Space between app links and language switcher */
    margin-left: auto; /* Push to the right */
    justify-content: flex-end; /* Ensure content is pushed to the right */
}

/* Language Switcher */
#langSelect {
    padding: 16px 35px; /* Match app-button padding */
    border-radius: 15px; /* Match app-button border-radius */
    border: none; /* Remove border */
    background-color: #b61919; /* Black background */
    font-size: 1.15em; /* Match app-button font size */
    color: white; /* White text */
    cursor: pointer;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); /* Match app-button shadow */
    transition: all 0.3s ease;
    appearance: none; /* Remove default select arrow */
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%20viewBox%3D%220%200%20292.4%20292.4%22%3E%3Cpath%20fill%3D%22%23ffffff%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13.2-5.6H18.6c-5%200-9.3%201.8-13.2%205.6-3.9%203.9-5.6%208.2-5.6%2013.2%200%205%201.8%209.3%205.6%2013.2l128%20128c3.9%203.9%208.2%205.6%2013.2%205.6s9.3-1.8%2013.2-5.6l128-128c3.8-3.9%205.6-8.2%205.6-13.2%200-5-1.8-9.3-5.6-13.2z%22%2F%3E%3C%2Fsvg%3E'); /* White arrow */
    background-repeat: no-repeat;
    background-position: right 20px center; /* Move arrow slightly more to the left */
    background-size: 18px; /* Make arrow larger */
    font-weight: bold; /* Match app-button font weight */
    text-indent: 10px; /* Push text slightly to the right to make space for arrow */
    text-overflow: ellipsis; /* Add ellipsis for long text */
    white-space: nowrap; /* Prevent text wrapping */
    overflow: hidden; /* Hide overflowing text */
}

#langSelect:hover {
    background-color: #333333; /* Darker grey on hover */
    transform: translateY(-7px); /* More pronounced lift */
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #ff5050 0%, #e6c8c8 100%); /* Soft, inviting gradient */
    color: #2c3e50;
    text-align: center;
    padding: 80px 25px; /* Reduced top padding to account for nav bar */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    animation: fadeIn 1s ease-out;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    animation: subtlePulse 15s infinite alternate ease-in-out;
    pointer-events: none;
}

.hero-section h1 {
    font-size: 4.5em; /* Larger, more impactful heading */
    margin-bottom: 25px;
    color: #2c3e50;
    animation: slideInFromTop 0.8s ease-out;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.08);
}

.heart-icon {
    height: 0.8em; /* Make heart icon slightly smaller than surrounding text */
    vertical-align: middle; /* Align with text */
    margin: 0 5px; /* Add some spacing */
}

.hero-section p {
    font-size: 1.5em;
    margin-bottom: 50px;
    animation: fadeIn 1.2s ease-out;
    color: #444;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Styles for dynamically loaded hero content */
.main-heading {
    font-size: 3.5em; /* Increased size for "Welcome to Love Compatible" */
    margin-bottom: 15px;
    color: #2c3e50;
    margin-left: auto;
    margin-right: auto;
    text-align: center; /* Center the main heading */
}

.introduction-text {
    font-size: 1.8em; /* Increased size for introduction text */
    margin-bottom: 30px;
    color: #444;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: center; /* Center the main heading */
}

/* App Links in Top Nav */
.top-nav-app-links {
    display: flex;
    gap: 15px; /* Space between app buttons in top nav */
    flex-wrap: wrap;
}

/* Original app-links (now removed from hero section) */
/* .app-links {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
} */

.app-button {
    display: inline-flex;
    align-items: center;
    background-color: #000000; /* A professional blue */
    color: white;
    padding: 16px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.15em;
    transition: all 0.3s ease;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); /* Slightly softer shadow */
    border: none;
    cursor: pointer;
}

.app-button .app-icon {
    width: 24px; /* Adjust icon size as needed */
    height: 24px;
    margin-right: 10px; /* Space between icon and text */
    vertical-align: middle; /* Align icon with text */
}

.app-button .button-text {
    vertical-align: middle;
}

.app-button:hover {
    background-color: #333333; /* Darker grey on hover */
    transform: translateY(-7px); /* More pronounced lift */
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

/* Content Section */
.content-section {
    padding: 80px 25px; /* More padding */
}

.section-card {
    background-color: white;
    border-radius: 18px;
    padding: 50px;
    margin-bottom: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    opacity: 0;
    transform: translateY(40px);
    border: 1px solid #f0f0f0;
}

.section-card.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.section-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.section-content {
    display: flex;
    align-items: center; /* Align items vertically in the center */
    gap: 40px; /* Space between text and image */
}

.section-image-wrapper {
    flex: 1.5; /* Image wrapper takes more space */
    min-width: 300px; /* Minimum width for image column */
    text-align: center;
}

.section-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section-image:hover {
    transform: scale(1.015);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.image-caption {
    font-size: 1em;
    color: #777;
    text-align: center;
    margin-top: 18px;
    font-style: italic;
}

.section-text-content {
    flex: 1; /* Text content takes less space */
}

.section-text-content h2 {
    color: #ff5f5f;
    font-size: 2.8em;
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.section-text-content p {
    color: #555;
    font-size: 1.15em;
}

/* Footer */
footer {
    background-color: #34495e;
    color: white; /* Ensure footer text is white */
    text-align: center;
    padding: 40px 25px;
    margin-top: 80px;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.05);
}

footer p {
    color: white; /* Explicitly set paragraph color in footer to white */
}

/* Modal for Image Preview */
.modal {
    display: none; /* Hidden by default, controlled by JS */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95); /* Darker, more opaque overlay */
    align-items: center;
    justify-content: center;
    animation: fadeInModal 0.3s ease-out;
}

.modal-content-wrapper { /* New wrapper for modal content (header, image, footer) */
    background-color: #fff;
    border-radius: 20px; /* More rounded corners */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7); /* Bigger, rounder shadow */
    max-width: 90%; /* Make modal content bigger */
    max-height: 90%;
    display: flex;
    flex-direction: column;
    overflow: auto; /* Allow scrolling for content */
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background-color: #fff;
    border-bottom: 1px solid #eee;
    /* border-top-left-radius and border-top-right-radius moved to .modal-content-wrapper */
    width: 100%; /* Take full width of wrapper */
    box-sizing: border-box;
}

.modal-header h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.8em;
}

.modal-image-container { /* Container for the image to control its size within the modal */
    flex-grow: 1;
    align-items: center;
    justify-content: center;
    padding: 20px; /* Padding around the image */
    overflow: auto; /* Allow scrolling for image if it overflows */
}

.modal-content { /* This is the actual image */
    max-width: 100%;
    max-height: 100%;
    display: block;
    border-radius: 10px; /* Keep image slightly rounded */
    animation: zoomIn 0.3s ease-out;
    box-shadow: none; /* Remove individual image shadow, use wrapper shadow */
}

.modal-footer {
    padding: 20px 30px;
    background-color: #fff;
    border-top: 1px solid #eee;
    /* border-bottom-left-radius and border-bottom-right-radius moved to .modal-content-wrapper */
    text-align: right;
    width: 100%; /* Take full width of wrapper */
    box-sizing: border-box;
}

.close-button {
    color: #555;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    text-shadow: none;
}

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

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

@keyframes slideInFromTop {
    from { transform: translateY(-100px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

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

@keyframes zoomIn {
    from { transform: scale(0.6); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes subtlePulse {
    0% { transform: scale(1); opacity: 0.08; }
    50% { transform: scale(1.03); opacity: 0.12; }
    100% { transform: scale(1); opacity: 0.08; }
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-section h1 {
        font-size: 3.5em;
    }
    .hero-section p {
        font-size: 1.3em;
    }
    .section-card {
        padding: 40px;
    }
    .section-card h2 {
        font-size: 2.2em;
    }
    .section-card p {
        font-size: 1.05em;
    }
    .modal-header, .modal-footer {
        width: 95%;
        max-width: 800px;
    }
    .modal-content {
        max-width: 95%;
        max-height: 95%;
    }
}

@media (max-width: 768px) {
    .main-nav {
        padding: 10px 0;
    }
    .nav-container {
        flex-direction: column; /* Stack logo and top-right-nav vertically */
        gap: 15px;
    }
    .app-logo {
        max-width: 120px; /* Smaller logo on mobile */
    }
    .top-right-nav {
        flex-direction: column; /* Stack app links and language switcher vertically */
        gap: 15px;
    }
    .hero-section {
        padding: 60px 20px; /* Further reduced padding for mobile */
    }
    .hero-section h1 {
        font-size: 2.8em;
    }
    .hero-section p {
        font-size: 1.1em;
    }
    .app-links {
        flex-direction: column;
        gap: 18px;
    }
    .app-button {
        width: 90%;
        max-width: 350px;
        padding: 14px 25px;
    }
    .content-section {
        padding: 50px 20px;
    }
    .section-card {
        padding: 30px;
        margin-bottom: 30px;
    }
    .section-card h2 {
        font-size: 1.8em;
    }
    .section-card p {
        font-size: 1em;
    }
    .close-button {
        font-size: 30px;
    }
    .modal-header, .modal-footer {
        width: 98%;
        max-width: 600px;
        padding: 15px 20px;
    }
    .modal-header h2 {
        font-size: 1.3em;
    }
}

@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 2em;
    }
    .hero-section p {
        font-size: 0.95em;
    }
    .section-card h2 {
        font-size: 1.5em;
    }
    .section-card p {
        font-size: 0.9em;
    }
    .container {
        padding: 0 15px;
    }
}