/* ============================================
   Family Care Center — Custom Styles
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    min-height: 100vh;
}

/* --- Geometric Background Shapes --- */
.geo-shape {
    position: fixed;
    pointer-events: none;
    z-index: 0;
    opacity: 0.08;
}

.circle-1 {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: #2e7d32;
    top: -100px;
    right: -100px;
    animation: float-slow 20s ease-in-out infinite;
}

.circle-2 {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: #4caf50;
    bottom: 20%;
    left: -80px;
    animation: float-slow 15s ease-in-out infinite reverse;
}

.triangle-1 {
    width: 0;
    height: 0;
    border-left: 120px solid transparent;
    border-right: 120px solid transparent;
    border-bottom: 208px solid #1b5e20;
    top: 40%;
    right: 5%;
    transform: rotate(15deg);
    animation: float-slow 18s ease-in-out infinite;
}

.square-1 {
    width: 150px;
    height: 150px;
    background: #81c784;
    bottom: 10%;
    right: 15%;
    transform: rotate(45deg);
    animation: float-slow 22s ease-in-out infinite reverse;
}

.circle-3 {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: #c5e1a5;
    top: 60%;
    left: 10%;
    opacity: 0.05;
    animation: float-slow 17s ease-in-out infinite;
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(5deg); }
}

/* --- Floating Cards Animation --- */
.float-card-1 {
    animation: float-card-1 4s ease-in-out infinite;
}

.float-card-2 {
    animation: float-card-2 5s ease-in-out infinite;
}

.float-card-3 {
    animation: float-card-3 4.5s ease-in-out infinite;
}

@keyframes float-card-1 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes float-card-2 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes float-card-3 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* --- Service Cards --- */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #81c784, #4caf50, #2e7d32);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover::before {
    opacity: 1;
}

/* --- Navbar --- */
#navbar {
    background: rgba(250, 251, 246, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(46, 125, 50, 0.1);
}

#navbar.scrolled {
    background: rgba(250, 251, 246, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

/* --- Mobile Menu --- */
.mobile-nav-link {
    position: relative;
    padding-left: 0;
    transition: padding-left 0.2s ease, color 0.2s ease;
}

.mobile-nav-link:hover {
    padding-left: 12px;
    color: #2e7d32;
}

.mobile-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background: #2e7d32;
    transition: width 0.2s ease;
}

.mobile-nav-link:hover::before {
    width: 6px;
}

/* Mobile menu button animation */
#mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#mobile-menu-btn.active .menu-line:nth-child(3) {
    width: 20px;
    margin-left: 0;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Scroll Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* --- Back to Top --- */
#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#back-to-top:not(.visible) {
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
}

/* --- Form Focus Styles --- */
input:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.15);
}

/* --- Responsive adjustments --- */
@media (max-width: 640px) {
    .geo-shape {
        display: none;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    .geo-shape {
        opacity: 0.05;
    }
}

/* --- Selection Color --- */
::selection {
    background: #c5e1a5;
    color: #0d2e10;
}
