/* style.css - HealthLink Global Styles */

/* CSS Custom Properties (Variables) */
:root {
    --primary-color: #007bff;
    --primary-color-dark: #0056b3;
    --primary-color-light: #e7f1ff; /* Added for icon backgrounds etc. */
    --secondary-color: #6c757d;
    --secondary-color-dark: #5a6268; /* Added for button hovers */
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --text-color: #212529;
    --text-color-light: #6c757d;
    --border-color: #dee2e6; /* Standard border color */
    --border-radius: 8px;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --box-shadow-light: 0 2px 8px rgba(0,0,0,0.07); /* Lighter shadow option */
    --transition-speed: 0.3s;
}

/* General Body Styles */
body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    line-height: 1.7;
    background-color: #ffffff;
    font-weight: 300;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex-grow: 1; /* Ensures main content pushes footer down */
}

/* Heading Styles */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--dark-color);
    margin-top: 0;
}

/* Paragraph Styles */
p {
    margin-bottom: 1rem;
    font-weight: 400;
}
.lead {
    font-weight: 300;
}

/* Link Styles */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}
a:hover {
    color: var(--primary-color-dark);
}

/* Image Styles */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Global Header Styles (for Bootstrap Navbar on internal pages) --- */
.site-header { /* Common for all headers */
    background-color: #ffffff;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    /* sticky-top class from Bootstrap is used in HTML */
}

/* For index.php simpler header */
.header-content-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo-container { /* Used in index.php header */
    display: flex;
    align-items: center;
}
.logo-img { /* Used in index.php header */
    height: 45px;
    margin-right: 12px;
}
/* For Navbar Brand Text (used in internal page headers) */
.navbar-brand.header-title-text {
    font-size: 1.7em;
    font-weight: 700;
    color: var(--primary-color);
}
.navbar-brand.header-title-text:hover {
    color: var(--primary-color-dark);
}

/* Custom Nav Link styles (general for both header types, specific overrides for .navbar context) */
.custom-nav-link {
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
    font-weight: 400;
    transition: all var(--transition-speed) ease;
    color: var(--text-color);
}
.custom-nav-link:hover {
    background-color: var(--light-color);
    border-color: var(--primary-color-dark); /* Or transparent to avoid jump */
    color: var(--primary-color-dark) !important;
}
.custom-nav-link-primary { /* For standout Sign Up button */
    background-color: var(--primary-color);
    color: #fff !important;
    border-color: var(--primary-color);
}
.custom-nav-link-primary:hover {
    background-color: var(--primary-color-dark);
    border-color: var(--primary-color-dark);
    color: #fff !important;
}

/* Styles for .custom-nav-link within .navbar (internal pages) */
.navbar .nav-link.custom-nav-link {
    padding: 0.6rem 1rem;
    font-weight: 500;
    color: var(--text-color-light);
    border-radius: var(--border-radius);
    margin: 0 0.25rem; /* Small margin between items */
}
.navbar .nav-link.custom-nav-link:hover {
    color: var(--primary-color) !important;
    background-color: #f0f0f0;
    border-color: transparent; /* Avoid border jump on hover for navbar items */
}
.navbar .nav-link.custom-nav-link.active {
    color: var(--primary-color-dark) !important;
    font-weight: 700;
    background-color: #e9ecef;
}

/* Profile Dropdown Toggle Link in Navbar */
.navbar .nav-link.custom-nav-link-profile {
    color: var(--text-color-light); /* Same as other nav links */
}
.navbar .nav-link.custom-nav-link-profile:hover {
    color: var(--primary-color) !important;
    background-color: #f0f0f0;
}
.navbar .nav-link.custom-nav-link-profile.active { /* If profile page itself is active */
    color: var(--primary-color-dark) !important;
    font-weight: 700;
    background-color: #e9ecef;
}

/* Dropdown Menu (Bootstrap) */
.dropdown-menu {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border: 1px solid var(--border-color);
    margin-top: 0.5rem !important;
}
.dropdown-item {
    padding: 0.6rem 1.2rem;
    font-weight: 400;
    color: var(--text-color);
}
.dropdown-item:hover {
    background-color: var(--primary-color-light);
    color: var(--primary-color);
}
.dropdown-item.active, .dropdown-item:active {
    background-color: var(--primary-color);
    color: #fff !important;
}
.dropdown-divider {
    border-top: 1px solid var(--border-color);
}


/* --- Global Hero Section Styles (for index.php, home.php) --- */
.hero-section {
    position: relative;
    color: #fff;
    padding: 80px 0;
    display: flex;
    align-items: center;
    min-height: 60vh; /* Adjusted default min-height */
    box-sizing: border-box;
}
.hero-background { /* The actual image and gradient overlay */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Specific background-image will be in page-specific CSS */
    background-size: cover;
    background-position: center;
    z-index: 1;
}
.hero-content-container {
    position: relative;
    z-index: 2;
}
.hero-text-content { /* Semi-transparent background for text readability */
    max-width: 750px;
    background-color: rgba(0, 0, 0, 0.3); /* Adjusted for better contrast */
    padding: 30px 40px;
    border-radius: var(--border-radius);
}
.hero-section h1 {
    font-size: 2.8em;
    margin-bottom: 0.5em;
    font-weight: 700;
    color: #fff; /* Ensure hero h1 is white */
    line-height: 1.2;
}
.hero-section .lead {
    font-size: 1.15em;
    margin-bottom: 1.5em;
    color: rgba(255, 255, 255, 0.9); /* Slightly brighter lead text */
}

/* --- Global Custom Button Styles --- */
.custom-btn-primary, .custom-btn-secondary, .custom-btn-outline {
    padding: 0.65rem 1.5rem; /* Standardized padding */
    font-weight: 500; /* Standardized weight */
    letter-spacing: 0.5px;
    transition: all var(--transition-speed) ease;
    border-radius: var(--border-radius);
    border: 2px solid transparent; /* Base border for consistent sizing */
    font-size: 0.9rem; /* Standardized font size */
    text-transform: uppercase;
    line-height: 1.5; /* Bootstrap btn default */
}
.hero-actions .custom-btn-primary, /* Larger buttons specifically for hero */
.hero-actions .custom-btn-secondary {
    padding: 0.75rem 1.75rem;
    font-weight: 600;
    font-size: 0.95em;
}

.custom-btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}
.custom-btn-primary:hover {
    background-color: var(--primary-color-dark);
    border-color: var(--primary-color-dark);
    color: #fff;
    transform: translateY(-2px);
}

.custom-btn-secondary { /* For hero: white outline. For general use: grey outline */
    background-color: transparent;
    color: var(--secondary-color); /* Default to secondary color text */
    border-color: var(--secondary-color); /* Default to secondary color border */
}
.hero-actions .custom-btn-secondary { /* Specific for hero */
    color: #fff;
    border-color: #fff;
}
.custom-btn-secondary:hover {
    background-color: var(--secondary-color);
    color: #fff;
    border-color: var(--secondary-color);
    transform: translateY(-2px);
}
.hero-actions .custom-btn-secondary:hover { /* Specific for hero */
    background-color: #fff;
    color: var(--primary-color); /* Text color on hover for hero secondary */
}

.custom-btn-outline { /* Primary outline button */
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}
.custom-btn-outline:hover {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}


/* --- Global Section Title Style --- */
.section-title {
    margin-bottom: 3rem;
    font-size: 2.2em;
    font-weight: 700;
    color: var(--dark-color);
    /* If a title is ALWAYS centered, you can add text-align: center; here.
       Otherwise, use the text-center Bootstrap class in HTML as you are doing. */
}

.section-title.text-center::after, /* Handles when Bootstrap text-center is used */
.section-title:not(.text-start):not(.text-end)::after { /* Handles if text-align:center is on .section-title itself and it's not explicitly aligned left/right */
    content: '';
    display: block;
    width: 80px; /* Or your desired width */
    height: 4px;
    background-color: var(--primary-color);
    margin: 10px auto 0; /* This is key for centering */
    border-radius: 2px;
}

.section-title.text-start::after { /* For left-aligned titles */
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 10px 0 0; /* Align underline to left */
    border-radius: 2px;
}

/* If you have text-end titles */
.section-title.text-end::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 10px 0 0 auto; /* Align underline to right by setting left margin to auto */
    border-radius: 2px;
}


/* --- Global Info Block / Card Style (.info-block-item) --- */
.info-block-item {
    background-color: #ffffff;
    padding: 25px; /* Standardized padding */
    text-align: center;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-light); /* Using lighter default shadow */
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%; /* For Bootstrap d-flex on parent col to make cards same height */
}
.info-block-item:hover {
    transform: translateY(-8px); /* Standardized hover transform */
    box-shadow: var(--box-shadow); /* Using main shadow on hover */
}
.info-block-item .info-image-container, /* For actual images */
.info-block-item .card-icon-display {    /* For Font Awesome icons */
    width: 100%;
    max-width: 120px; /* Max width for image/icon area */
    height: 120px;    /* Fixed height */
    margin-left: auto;  /* Center the container itself */
    margin-right: auto;
    margin-bottom: 20px; /* Standardized spacing */
    border-radius: var(--border-radius); /* Standard radius for image container */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.info-block-item .info-image-container .info-img { /* For actual <img> tags */
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.info-block-item .card-icon-display { /* Specific for icon containers */
    background-color: var(--primary-color-light);
    color: var(--primary-color);
    border-radius: 50%; /* Circular for icons */
    font-size: 1.5rem; /* Base size for icon container text/icon size (fa-3x will override) */
}
.info-block-item .card-icon-display .emoji-icon-large { /* For emoji icons in cards */
    font-size: 3em; /* Adjust as needed for emoji size */
}
.info-block-item h3 {
    margin-bottom: 12px; /* Standardized spacing */
    color: var(--primary-color);
    font-size: 1.3em;
    font-weight: 600;
}
.info-block-item p {
    font-size: 0.9em; /* Standardized paragraph size in cards */
    color: var(--text-color-light);
    flex-grow: 1; /* Allows p to take available space, pushing button down */
    margin-bottom: 1rem;
}
.info-block-item .btn { /* Button at the bottom of the card */
    margin-top: auto; /* Pushes button to the bottom if card is flex column */
}


/* --- Global Footer Styles --- */
.site-footer {
    background-color: var(--dark-color);
    color: rgba(255, 255, 255, 0.7); /* Default text color in footer */
    font-size: 0.9em;
    margin-top: auto; /* Pushes footer to bottom if content is short */
}
.footer-heading {
    font-weight: 600;
    color: #e9ecef;
    margin-bottom: 1rem;
    font-size: 1.1em;
}
.footer-links li {
    margin-bottom: 0.5rem;
}
.footer-links a, .site-footer p a {
    color: rgba(255, 255, 255, 0.7);
    transition: color var(--transition-speed) ease;
}
.footer-links a:hover, .site-footer p a:hover {
    color: #fff;
    text-decoration: underline;
}
.site-footer p.small {
    font-size: 0.9em;
    line-height: 1.6;
}
.footer-bottom {
    color: rgba(255, 255, 255, 0.5);
    border-top-color: rgba(255, 255, 255, 0.2) !important; /* Ensure Bootstrap class is overridden */
}

/* --- Utility Classes (Optional, add as needed) --- */
.bg-primary-custom {
    background-color: var(--primary-color) !important;
}
.text-primary-custom {
    color: var(--primary-color) !important;
}


/* --- Responsive Adjustments (from index.php style.css, generalized) --- */
@media (max-width: 991.98px) { /* lg breakpoint */
    .hero-section h1 { font-size: 2.4em; }
    .hero-section .lead { font-size: 1.1em; }
    .navbar-brand.header-title-text { font-size: 1.5em; }
    .logo-img { height: 40px; }
    .section-title { font-size: 2em; }
}

@media (max-width: 767.98px) { /* md breakpoint */
    .site-header .container { /* Allow header content to stack if not navbar */
        flex-direction: column;
        gap: 15px;
    }
    .site-header .header-nav { /* For non-navbar headers like index.php */
        margin-left: 0 !important;
        justify-content: center;
        width: 100%;
    }
    .navbar-nav { /* For Bootstrap navbars */
        width: 100%;
        text-align: center;
    }
    .navbar-nav .nav-item {
        margin-bottom: 0.5rem;
    }
    .navbar-nav .dropdown-menu {
        text-align: left; /* Align dropdown items left */
    }

    .hero-section { padding: 60px 0; min-height: auto; }
    .hero-text-content { padding: 20px; }
    .hero-section h1 { font-size: 2em; }
    .hero-section .lead { font-size: 1em; }
    .hero-actions { display: flex; flex-direction: column; gap: 10px; }
    .hero-actions .btn { width: 100%; margin: 0 !important; }

    .section-title { font-size: 1.8em; margin-bottom: 2rem; }
    .info-block-item .info-image-container,
    .info-block-item .card-icon-display {
        max-width: 100px;
        height: 100px;
    }
    .site-footer .col-lg-4, .site-footer .col-md-6 { text-align: center; }
    .footer-links { padding-left: 0; }
}

@media (max-width: 575.98px) { /* sm breakpoint */
    .navbar-brand.header-title-text { font-size: 1.3em; }
    .logo-img { height: 35px; }
    .hero-section h1 { font-size: 1.7em; }
    .hero-section .lead { font-size: 0.9em; }
    .info-block-item h3 { font-size: 1.2em; }
    .info-block-item p { font-size: 0.9em; }
}

.hero-background { 
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1; /* Ensures it's behind the text content */
}