/* =============================================
   Responsive Hero Section Styles
   ============================================= */

   .rh-container {
    width: 100%;
    /* Reduced vertical margin for typical flow, adjust as needed */
    margin: 20px auto;
    padding: 0;
    box-sizing: border-box;
    position: relative; /* Crucial for absolute positioning children */
    overflow: hidden; /* Ensures content respects border-radius */
    border-radius: 8px; /* Rounded corners for the whole component */
    min-height: 700px; /* Minimum height to prevent collapse */
}

.rh-image {
    width: 100%;
    height: 100%; /* Make image fill the container height */
    min-height: inherit; /* Inherit min-height from container */
    /* Max height relative to viewport height, adjust as needed */
    max-height: 70vh;
    display: block; /* Remove bottom space */
    object-fit: cover; /* Scale the image to cover the container */
    object-position: center; /* Center the image within its box */
    position: absolute; /* Position behind overlay and content */
    top: 0;
    left: 0;
    z-index: 1; /* Behind overlay/content */
    border-radius: inherit; /* Inherit border-radius from container */
}

.rh-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45); /* Darker overlay for better contrast */
    z-index: 2; /* Above image, below content */
    border-radius: inherit; /* Inherit border-radius from container */
}

.rh-content {
    position: relative; /* Changed from absolute to relative for flow */
    z-index: 3; /* Above overlay */
    display: flex; /* Use flexbox for centering */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: inherit; /* Ensure content area takes at least container min-height */
    height: 100%; /* Try to fill container height */
    text-align: center;
    width: 90%; /* Use most of the width */
    max-width: 1100px; /* Max content width */
    margin: 0 auto; /* Center the content block horizontally */
    padding: 30px 20px; /* Generous padding */
    box-sizing: border-box;
    color: white; /* Default text color */
}

.rh-title {
    /* Responsive font size using clamp: min, preferred (based on viewport width), max */
    font-size: clamp(1.8rem, 5vw, 3.2rem);
    margin-bottom: 15px; /* Space below title */
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    font-weight: 600; /* Semi-bold */
    line-height: 1.2; /* Improve readability */
    word-break: break-word; /* Prevent overflow on long words */
    color:white;
}

.rh-subtitle {
    /* Responsive font size */
    font-size: clamp(1rem, 3vw, 1.5rem);
    margin-bottom: 30px; /* Increased spacing before buttons */
    opacity: 0.9; /* Slightly less prominent than title */
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.7);
    line-height: 1.4;
    word-break: break-word;
    max-width: 800px; /* Prevent subtitle from becoming too wide */
    color: white;
}

.rh-buttons {
    margin-top: 20px; /* Space above buttons */
    display: flex; /* Use flexbox for button layout */
    justify-content: center; /* Center buttons horizontally */
    align-items: center; /* Align items vertically */
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    gap: 15px; /* Spacing between buttons */
    width: 100%; /* Take full width for centering */
}

.rh-button-link {
    text-decoration: none; /* Remove underline from links */
    display: inline-block; /* Proper spacing and alignment */
    color: inherit; /* Inherit text color, can be overridden by specific button styles */
}

/* Base styles for the button - apply your theme's button class (e.g., .pq-button)
   or define styles here */
.rh-button {
    display: inline-block; /* Ensure button behaves like a block within the link */
    padding: 12px 30px; /* Comfortable padding */
    border-radius: 5px; /* Slightly rounded corners */
    font-weight: 500; /* Medium weight */
    font-size: clamp(0.9rem, 1.8vw, 1.1rem); /* Responsive font size */
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    text-align: center;
    border: none; /* Assuming buttons don't have borders by default */
    background-color: var(--dark-color); /* Example background - Use your theme color */
    color: white; /* Example text color */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.rh-button:hover {
    background-color: var(--primary-color); /* Example darker hover color */
    transform: translateY(-2px); /* Subtle lift effect */
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* --- Media Queries for Responsiveness --- */

/* Tablet Styles (e.g., <= 768px) */
@media (max-width: 768px) {
    .rh-container {
        margin: 15px auto; /* Slightly reduce vertical margin */
        min-height: 220px;
    }
    .rh-image {
         max-height: 65vh; /* Adjust max height if needed */
    }
    .rh-content {
        padding: 25px 15px; /* Adjust padding */
    }
    .rh-title {
        font-size: clamp(1.6rem, 6vw, 2.8rem);
        margin-bottom: 12px;
    }
    .rh-subtitle {
        font-size: clamp(0.9rem, 3.5vw, 1.3rem);
        margin-bottom: 25px;
    }
    .rh-buttons {
        margin-top: 15px;
        gap: 12px;
    }
    .rh-button {
        padding: 10px 25px;
    }
}

/* Mobile Styles (e.g., <= 480px) */
@media (max-width: 480px) {
    .rh-container {
        margin: 10px auto; /* Further reduce vertical margin */
        border-radius: 6px; /* Slightly smaller radius */
        min-height: 200px;
    }
    .rh-image {
         max-height: 60vh; /* Adjust max height */
    }
     .rh-content {
         width: 95%; /* Use slightly more width */
         padding: 20px 10px; /* Reduce padding */
         /* Ensure content vertical centering works well with potentially shorter container */
         justify-content: center;
     }
    .rh-title {
        font-size: clamp(1.4rem, 7vw, 2.2rem);
        margin-bottom: 10px;
    }
    .rh-subtitle {
        font-size: clamp(0.85rem, 4vw, 1.1rem);
        margin-bottom: 20px;
    }
    .rh-buttons {
        margin-top: 15px;
        flex-direction: column; /* Stack buttons vertically */
        gap: 10px; /* Vertical gap when stacked */
        align-items: center; /* Center stacked buttons */
    }
    /* Make button link take width for centering button */
    .rh-button-link {
         width: 100%; /* Allow link to stretch */
         max-width: 300px; /* Max width for stacked buttons */
         display: block; /* Ensure it takes block-level width */
    }
     .rh-button {
        padding: 12px 20px; /* Adjust padding for full width */
        width: 100%; /* Make button take full width of its link container */
        box-sizing: border-box; /* Include padding in width calculation */
        font-size: clamp(0.9rem, 4vw, 1rem); /* Adjust font size for mobile */
    }
}