/**
 * Thalangara Palliative Care - Bootstrap Custom Styles
 */

/* CSS Variables */
:root {
    --primary-color: #6c5ce7;
    --primary-dark: #5f3dc4;
    --primary-light: #845ef7;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --purple-gradient: linear-gradient(135deg, #6c5ce7 0%, #5f3dc4 100%);
    --blue-gradient: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    --purple-blue-gradient: linear-gradient(135deg, #6c5ce7 0%, #5f3dc4 50%, #0d6efd 100%);
}

/* Gradient Background */
.bg-gradient-primary {
    background: var(--purple-blue-gradient);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #6c5ce7 0%, #5f3dc4 50%, #0d6efd 100%);
    min-height: 650px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 4rem 0;
}

.hero-section::after {
    content: '';
    display: none;
}

.hero-content-wrapper {
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

.hero-stats {
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-section::before {
    display: none;
}

@keyframes drift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.hero-image-wrapper {
    position: relative;
}

.floating-icons {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}

.icon-float {
    position: absolute;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.2);
    animation: float 3s ease-in-out infinite;
}

.icon-float:nth-child(1) {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.icon-float:nth-child(2) {
    top: 60%;
    right: 10%;
    animation-delay: 1s;
}

.icon-float:nth-child(3) {
    bottom: 10%;
    left: 50%;
    animation-delay: 2s;
}

/* Medical Cross Icons Scattered */
.icon-cross {
    position: absolute;
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.15);
    animation: floatCross 4s ease-in-out infinite;
}

.icon-cross:nth-child(1) {
    top: 5%;
    left: 5%;
    animation-delay: 0s;
}

.icon-cross:nth-child(2) {
    top: 25%;
    right: 15%;
    animation-delay: 0.5s;
}

.icon-cross:nth-child(3) {
    bottom: 30%;
    left: 10%;
    animation-delay: 1s;
}

.icon-cross:nth-child(4) {
    top: 50%;
    right: 5%;
    animation-delay: 1.5s;
}

.icon-cross:nth-child(5) {
    bottom: 15%;
    right: 30%;
    animation-delay: 2s;
}

.icon-cross:nth-child(6) {
    top: 75%;
    left: 20%;
    animation-delay: 2.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes floatCross {
    0%, 100% { transform: translateY(0px) translateX(0px) rotate(0deg); opacity: 0.15; }
    25% { transform: translateY(-15px) translateX(10px) rotate(90deg); opacity: 0.25; }
    50% { transform: translateY(-25px) translateX(-5px) rotate(180deg); opacity: 0.15; }
    75% { transform: translateY(-10px) translateX(-10px) rotate(270deg); opacity: 0.2; }
}

.hero-doctor-image {
    position: relative;
    z-index: 2;
    border-radius: 1rem !important;
}

/* Floating Chat Bubble */
.floating-chat-bubble {
    position: absolute;
    top: 20%;
    right: -10px;
    background: white;
    padding: 1rem;
    border-radius: 1rem;
    z-index: 10;
    min-width: 200px;
    animation: bounceIn 1s ease-out;
}

@keyframes bounceIn {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.mini-avatars {
    display: flex;
    gap: -10px;
}

.mini-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid white;
    margin-left: -10px;
    object-fit: cover;
}

.mini-avatar:first-child {
    margin-left: 0;
}

/* Floating Stats Card */
.floating-stats-card {
    position: absolute;
    bottom: 10%;
    left: -20px;
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    z-index: 10;
    animation: slideUp 1s ease-out 0.5s both;
}

@keyframes slideUp {
    0% { transform: translateY(50px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* Experience Badge */
.experience-badge {
    top: 20px;
    right: 20px;
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    z-index: 5;
}

/* Service Cards - Colorful Backgrounds with Photos */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 1.5rem;
    overflow: hidden;
    position: relative;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.service-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.service-background-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.service-card:hover .service-background-image {
    transform: scale(1.1);
}

.service-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.service-card-1 .service-gradient-overlay {
    background: linear-gradient(135deg, rgba(116, 185, 255, 0.85) 0%, rgba(9, 132, 227, 0.9) 100%);
}

.service-card-2 .service-gradient-overlay {
    background: linear-gradient(135deg, rgba(162, 155, 254, 0.85) 0%, rgba(108, 92, 231, 0.9) 100%);
}

.service-card-3 .service-gradient-overlay {
    background: linear-gradient(135deg, rgba(0, 206, 201, 0.85) 0%, rgba(0, 184, 148, 0.9) 100%);
}

.service-card-4 .service-gradient-overlay {
    background: linear-gradient(135deg, rgba(9, 132, 227, 0.85) 0%, rgba(45, 52, 54, 0.9) 100%);
}

.service-card::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    /* Pattern removed */
    pointer-events: none;
    z-index: 3;
}

.service-card-1 {
    box-shadow: 0 8px 20px rgba(116, 185, 255, 0.3);
}

.service-card-2 {
    box-shadow: 0 8px 20px rgba(162, 155, 254, 0.3);
}

.service-card-3 {
    box-shadow: 0 8px 20px rgba(0, 206, 201, 0.3);
}

.service-card-4 {
    box-shadow: 0 8px 20px rgba(9, 132, 227, 0.3);
}

.service-icon-box-large {
    font-size: 4rem;
    color: white;
    opacity: 0.25;
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 4;
    transition: transform 0.3s ease;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3) !important;
}

.service-card:hover .service-icon-box-large {
    transform: scale(1.2) rotate(10deg);
    opacity: 0.35;
}

.service-card .card-body {
    position: relative;
    z-index: 5;
    background: transparent;
}

/* Team Cards - Gradient Background */
.team-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 1.5rem;
    overflow: hidden;
    border: 3px solid white !important;
}

.team-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(108, 92, 231, 0.4) !important;
}

.team-image-wrapper {
    position: relative;
    overflow: hidden;
}

.team-gradient-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(108, 92, 231, 0.8), transparent);
    z-index: 1;
}

.team-card .card-img-top,
.team-image-wrapper img {
    transition: transform 0.6s ease;
}

.team-card:hover .card-img-top,
.team-card:hover .team-image-wrapper img {
    transform: scale(1.1);
}

.team-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.team-card:hover .team-overlay {
    opacity: 1;
}

.team-social-icons {
    display: flex;
    gap: 1rem;
}

.team-social-icons a {
    transition: transform 0.3s ease;
    display: inline-flex;
    width: 45px;
    height: 45px;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    backdrop-filter: blur(10px);
}

.team-social-icons a:hover {
    transform: scale(1.2);
    background: rgba(255, 255, 255, 0.3);
}

/* Navbar */
.navbar {
    padding: 1rem 0;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.98) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.logo-icon-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.logo-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--primary-color);
    opacity: 0.3;
    animation: logo-pulse 2s ease-in-out infinite;
}

@keyframes logo-pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.3); opacity: 0; }
}

.navbar-brand h5 {
    color: var(--primary-color);
    transition: transform 0.3s ease;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.navbar-brand:hover h5 {
    transform: scale(1.02);
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 70%;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
    transform: translateY(-2px);
}

.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
}

/* About Section Image */
.about-image-wrapper {
    position: relative;
}

.about-image-wrapper img {
    transition: transform 0.3s ease;
}

.about-image-wrapper:hover img {
    transform: scale(1.05);
}

.about-image-wrapper::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    border-radius: 1rem;
    z-index: -1;
    opacity: 0.1;
    transition: opacity 0.3s ease;
}

.about-image-wrapper:hover::before {
    opacity: 0.2;
}

/* Testimonials */
.carousel-item {
    padding: 2rem 0;
}

/* Blog/News Cards */
.card-img-top {
    transition: transform 0.5s ease;
}

.card:hover .card-img-top {
    transform: scale(1.1);
}

/* Find Doctor Section Enhancement */
.find-doctor-section {
    background: linear-gradient(135deg, #6c5ce7 0%, #5f3dc4 50%, #0d6efd 100%);
    position: relative;
    overflow: hidden;
}

.find-doctor-section::before {
    display: none;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #6c5ce7 0%, #5f3dc4 50%, #0d6efd 100%);
    position: relative;
    overflow: hidden;
}

.bg-gradient-primary::before {
    display: none;
}

.search-container {
    animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
    0% { transform: translateY(-30px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.search-container .form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15) !important;
}

/* Interactive Elements */
.service-card,
.team-card,
.card {
    cursor: pointer;
}

/* Pulse Animation for Icons */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.service-icon-box:hover {
    animation: pulse 1s ease-in-out infinite;
}

/* Forms */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Buttons */
.btn {
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ============================================
   MOBILE RESPONSIVE ENHANCEMENTS
   ============================================ */

/* Desktop - Hide navbar toggler */
@media (min-width: 992px) {
    .navbar-toggler {
        display: none !important;
    }
    
    .navbar-collapse {
        display: flex !important;
    }
}

/* Base mobile styles */
@media (max-width: 991.98px) {
    /* Improved navigation for mobile */
    .navbar {
        padding: 0.75rem 0;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .navbar-brand h5 {
        font-size: 1.1rem !important;
    }
    
    .navbar-brand small {
        font-size: 0.7rem !important;
    }
    
    .navbar-toggler {
        display: block !important;
        padding: 0.5rem 0.75rem;
        font-size: 1.25rem;
        border: 2px solid transparent;
        border-radius: 0.5rem;
        min-width: 44px;
        min-height: 44px;
    }
    
    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    }
    
    .navbar-collapse {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .navbar-nav {
        gap: 0.5rem;
    }
    
    .nav-link {
        padding: 0.75rem 1rem !important;
        font-size: 1rem;
        border-radius: 0.5rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        transition: all 0.3s ease;
    }
    
    .nav-link:hover,
    .nav-link.active {
        background-color: rgba(13, 110, 253, 0.1);
        color: var(--primary-color) !important;
    }
    
    /* Mobile navigation buttons */
    .navbar-nav .btn {
        width: 100%;
        margin-top: 0.5rem;
        justify-content: center;
        min-height: 44px;
        font-size: 1rem;
    }
    
    /* Hero section mobile optimization */
    .hero-section {
        min-height: auto;
        padding: 2rem 1.25rem !important;
        text-align: center;
    }
    
    .hero-section .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    
    .hero-section .row {
        margin: 0;
        text-align: center;
    }
    
    .hero-section .col-lg-6 {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-section .col-lg-6:first-child {
        order: 1;
    }
    
    .hero-section .col-lg-6:last-child {
        order: 2;
    }
    
    .hero-content-wrapper {
        padding: 1rem 0;
    }
    
    .hero-section .badge {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
        border-radius: 50px;
        display: inline-flex;
        align-items: center;
        margin-bottom: 1.5rem !important;
    }
    
    .hero-section .display-4,
    .hero-section .display-3 {
        font-size: 1.875rem !important;
        line-height: 1.3;
        margin-bottom: 1rem;
        text-align: center;
    }
    
    .hero-section .lead {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 1.5rem;
        text-align: center;
        padding: 0 0.5rem;
    }
    
    .hero-stats {
        justify-content: center;
        gap: 1.5rem !important;
        margin-bottom: 1.5rem !important;
        padding: 1rem 0;
        flex-wrap: wrap;
    }
    
    .hero-stats > div {
        text-align: center;
        min-width: 80px;
    }
    
    .hero-stats h3 {
        font-size: 1.5rem;
    }
    
    .hero-stats small {
        font-size: 0.75rem;
        display: block;
        margin-top: 0.25rem;
    }
    
    .hero-section .btn {
        width: 100%;
        max-width: 100%;
        margin: 0.5rem 0;
        min-height: 52px;
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
        border-radius: 0.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 600;
    }
    
    .hero-section .d-flex.gap-3 {
        flex-direction: column;
        gap: 0.75rem !important;
        width: 100%;
        max-width: 100%;
    }
    
    .hero-image-wrapper {
        margin-top: 1.5rem;
        padding: 0 0.5rem;
    }
    
    .hero-doctor-image {
        border-radius: 1rem !important;
        max-height: 400px !important;
        width: 100%;
        object-fit: cover;
        object-position: center top;
    }
    
    /* Ensure hero image column stacks properly */
    .hero-section .col-lg-6:last-child {
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .hero-image-wrapper {
        width: 100%;
        max-width: 100%;
    }
    
    .floating-chat-bubble,
    .floating-stats-card {
        display: none; /* Hide on mobile for cleaner view */
    }
    
    .floating-icons {
        display: none; /* Hide floating icons on mobile */
    }
    
    /* Mobile-specific hero button styles */
    .hero-section .btn-light {
        background: white;
        color: var(--primary-color);
        border: none;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    
    .hero-section .btn-outline-light {
        background: transparent;
        color: white;
        border: 2px solid white;
    }
    
    /* Typography adjustments */
    .display-1 {
        font-size: 2.5rem !important;
    }
    
    .display-2 {
        font-size: 2rem !important;
    }
    
    .display-3 {
        font-size: 1.75rem !important;
    }
    
    .display-4 {
        font-size: 1.5rem !important;
    }
    
    .display-5 {
        font-size: 1.375rem !important;
    }
    
    .display-6 {
        font-size: 1.25rem !important;
    }
    
    h1 {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    h2 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    h3 {
        font-size: 1.25rem;
        line-height: 1.3;
    }
    
    /* Section spacing */
    section {
        padding: 2.5rem 0 !important;
    }
    
    .py-5 {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }
    
    /* Cards mobile optimization */
    .card {
        margin-bottom: 1rem;
        margin-left: 0.5rem;
        margin-right: 0.5rem;
    }
    
    .service-card {
        min-height: 280px;
        margin-left: 0.5rem;
        margin-right: 0.5rem;
    }
    
    .service-card .card-body {
        padding: 1.5rem;
    }
    
    /* Ensure all cards have side spacing */
    .card,
    .service-card-modern,
    .news-card-modern,
    .gallery-item-modern,
    .team-card,
    .contact-info-card,
    .volunteer-benefit-card,
    .donation-method-card {
        margin-left: 0.5rem;
        margin-right: 0.5rem;
    }
    
    /* Service cards - stack better on mobile */
    .service-card-modern {
        margin-bottom: 1.5rem;
    }
    
    .service-image-bg {
        height: 180px;
    }
    
    .service-content-modern {
        padding: 1.5rem;
    }
    
    /* Team cards */
    .team-card {
        margin-bottom: 2rem;
    }
    
    /* Forms mobile optimization */
    .form-control,
    .form-select {
        font-size: 16px !important; /* Prevents zoom on iOS */
        min-height: 48px;
        padding: 0.75rem 1rem;
        border-radius: 0.5rem;
        margin-left: 0.25rem;
        margin-right: 0.25rem;
    }
    
    /* Form containers get extra padding */
    .contact-form-card,
    .volunteer-form-card {
        margin-left: 0.5rem;
        margin-right: 0.5rem;
    }
    
    .form-control-lg {
        font-size: 16px !important;
        min-height: 52px;
        padding: 0.875rem 1.125rem;
    }
    
    textarea.form-control {
        min-height: 120px;
    }
    
    .form-label {
        font-size: 1rem;
        margin-bottom: 0.5rem;
        font-weight: 600;
    }
    
    /* Buttons mobile optimization */
    .btn {
        min-height: 44px;
        padding: 0.625rem 1.25rem;
        font-size: 1rem;
        border-radius: 0.5rem;
        touch-action: manipulation;
    }
    
    .btn-lg {
        min-height: 52px;
        padding: 0.75rem 1.5rem;
        font-size: 1.125rem;
    }
    
    .btn-sm {
        min-height: 36px;
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    /* Full width buttons on mobile */
    .btn-block,
    .w-100 {
        width: 100% !important;
    }
    
    /* Contact page mobile */
    .contact-info-card {
        margin-bottom: 1.5rem;
    }
    
    .contact-form-card {
        padding: 1.5rem !important;
    }
    
    /* Volunteer page mobile */
    .volunteer-benefit-card,
    .volunteer-form-card {
        margin-bottom: 1.5rem;
    }
    
    /* Donation page mobile */
    .donation-method-card {
        margin-bottom: 1.5rem;
    }
    
    .donation-amount-btn {
        padding: 1rem;
        font-size: 1rem;
        min-height: 60px;
    }
    
    /* Gallery mobile */
    .gallery-item-modern {
        margin-bottom: 1rem;
    }
    
    /* News cards mobile */
    .news-card-modern {
        margin-bottom: 1.5rem;
    }
    
    .news-card-image-wrapper {
        height: 200px;
    }
    
    /* Footer mobile optimization */
    footer {
        text-align: center;
    }
    
    footer .col-lg-4,
    footer .col-lg-2 {
        margin-bottom: 2rem;
    }
    
    footer ul {
        padding-left: 0;
    }
    
    footer li {
        margin-bottom: 0.75rem;
    }
    
    footer a {
        font-size: 0.95rem;
        padding: 0.5rem 0;
        display: inline-block;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Page headers mobile */
    .page-header,
    .about-hero-section,
    .contact-hero-section,
    .services-hero-section,
    .news-hero-section,
    .gallery-hero-section,
    .volunteer-hero-section,
    .donate-hero-section {
        padding: 2rem 1.25rem !important;
        text-align: center;
    }
    
    /* Hero section gets special mobile treatment */
    .hero-section {
        padding: 2rem 1.25rem !important;
    }
    
    /* Stats and impact sections */
    .impact-stat {
        padding: 1.5rem 1rem;
        margin-bottom: 1rem;
    }
    
    .impact-stat .display-4 {
        font-size: 2rem !important;
    }
    
    /* Working hours mobile */
    .working-hours-list {
        text-align: left;
    }
    
    .working-hours-list .d-flex {
        flex-direction: column;
        gap: 0.5rem;
        text-align: left;
    }
    
    /* Home care services mobile */
    .home-care-services-list .row {
        margin: 0;
    }
    
    .service-item-card {
        margin-bottom: 0.75rem;
        padding: 1rem !important;
    }
    
    /* Container padding on mobile */
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        max-width: 100%;
    }
    
    /* Add extra padding to main content areas */
    main .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    
    /* Section-specific padding */
    section .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    
    /* Card padding adjustments */
    .card,
    .service-card,
    .news-card-modern,
    .contact-info-card,
    .volunteer-benefit-card,
    .donation-method-card {
        margin-left: 0.5rem;
        margin-right: 0.5rem;
    }
    
    /* Navbar container padding */
    .navbar .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    
    /* Footer container padding */
    footer .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    
    /* Spacing utilities mobile */
    .mb-5 {
        margin-bottom: 2rem !important;
    }
    
    .mt-5 {
        margin-top: 2rem !important;
    }
    
    .py-4 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    
    /* Hide some decorative elements on mobile */
    .floating-icons {
        display: none;
    }
    
    /* Better table scrolling on mobile */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Pagination mobile */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .page-link {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.5rem 0.75rem;
    }
}

/* Extra small devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    .hero-section .display-4,
    .hero-section .display-3 {
        font-size: 1.75rem !important;
    }
    
    .display-1 {
        font-size: 2rem !important;
    }
    
    section {
        padding: 2rem 0 !important;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Content areas get more padding */
    main .container,
    section .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .navbar .container,
    footer .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Cards get side margins for breathing room */
    .card,
    .service-card,
    .news-card-modern,
    .contact-info-card,
    .volunteer-benefit-card,
    .donation-method-card {
        margin-left: 0.25rem;
        margin-right: 0.25rem;
    }
    
    /* Stack columns on very small screens */
    .row {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }
    
    .row > * {
        margin-bottom: 1rem;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    /* Ensure cards and content don't touch edges */
    .row .col,
    .row [class*="col-"] {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Smaller buttons on very small screens */
    .btn-lg {
        font-size: 1rem;
        padding: 0.625rem 1.25rem;
    }
    
    /* Footer adjustments */
    footer {
        padding: 2rem 0 !important;
    }
    
    footer h5,
    footer h6 {
        font-size: 1.1rem;
    }
}

/* Landscape orientation adjustments */
@media (max-width: 991.98px) and (orientation: landscape) {
    .hero-section {
        padding: 2rem 0;
        min-height: auto;
    }
    
    .navbar-collapse {
        max-height: 70vh;
        overflow-y: auto;
    }
}

/* Custom utility classes */
.text-white-50 {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: rgba(13, 110, 253, 0.2);
}

/* Mobile viewport fix */
:root {
    --vh: 1vh;
}

body {
    min-height: calc(var(--vh, 1vh) * 100);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #6c5ce7 0%, #5f3dc4 50%, #0d6efd 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    display: none;
}

/* Floating Action Buttons */
.floating-action-buttons {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.fab-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
}

.fab-btn:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    color: white;
}

.fab-primary {
    background: var(--primary-color);
}

.fab-success {
    background: #25d366;
}

.fab-danger {
    background: var(--danger-color);
    animation: pulse-heart 2s ease-in-out infinite;
}

@keyframes pulse-heart {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Responsive FAB */
@media (max-width: 991.98px) {
    .floating-action-buttons {
        bottom: 15px;
        right: 15px;
        gap: 12px;
        z-index: 1050;
    }
    
    .fab-btn {
        width: 52px;
        height: 52px;
        font-size: 1.35rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }
    
    .fab-btn:active {
        transform: scale(0.95);
    }
}

@media (max-width: 575.98px) {
    .floating-action-buttons {
        bottom: 10px;
        right: 10px;
        gap: 10px;
    }
    
    .fab-btn {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
}

    /* Section spacing */
    section {
        padding: 4rem 0;
    }
    
    /* Mobile section padding with side breathing room */
    @media (max-width: 991.98px) {
        section {
            padding-left: 1rem;
            padding-right: 1rem;
        }
        
        .py-5 {
            padding-left: 1rem !important;
            padding-right: 1rem !important;
        }
    }

/* Footer links */
footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: white !important;
}
