/* Primelife Home Care - Modernized Styles */

:root {
    --brand-primary: #013d74;
    --brand-secondary: #04a8bc;
    --brand-accent: #fdc656;
    --brand-dark: #0a1628;
    --brand-light: #f0f7ff;
    --ink: #0b1b2b;
    --muted: #51627a;
    --surface: #ffffff;
    --surface-soft: #f7fbff;
    --surface-strong: #e7f4ff;
    --border: rgba(1, 61, 116, 0.12);
    --shadow-sm: 0 2px 12px rgba(10, 22, 40, 0.08);
    --shadow-md: 0 18px 36px rgba(10, 22, 40, 0.12);
    --shadow-lg: 0 28px 60px rgba(1, 61, 116, 0.18);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', 'Avenir Next', 'Avenir', 'Helvetica Neue', sans-serif;
    color: var(--ink);
    line-height: 1.6;
    background:
        radial-gradient(circle at 12% 18%, rgba(253, 198, 86, 0.18), transparent 40%),
        radial-gradient(circle at 88% 12%, rgba(4, 168, 188, 0.12), transparent 38%),
        linear-gradient(180deg, #f8fbff 0%, #ffffff 45%, #f4f8ff 100%);
    min-height: 100vh;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

p {
    margin: 0;
}

.font-display {
    font-family: 'Outfit', 'Avenir Next', 'Avenir', sans-serif;
    letter-spacing: -0.02em;
}

/* Header */
#main-header {
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(1, 61, 116, 0.08);
}

#main-header.scrolled {
    box-shadow: 0 18px 40px rgba(1, 61, 116, 0.1);
    border-bottom-color: rgba(1, 61, 116, 0.12);
}

#main-header .top-bar {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#main-header.scrolled .top-bar {
    transform: translateY(-100%);
    opacity: 0;
    position: absolute;
}

#main-header .main-nav-container {
    height: 88px;
    transition: all 0.3s ease;
}

#main-header.scrolled .main-nav-container {
    height: 70px;
}

#main-header .logo-img {
    height: 56px;
    transition: all 0.3s ease;
}

#main-header.scrolled .logo-img {
    height: 44px;
}

.nav-link {
    position: relative;
    font-weight: 600;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--brand-secondary), var(--brand-accent));
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Hero */
.hero-shell {
    position: relative;
    overflow: hidden;
}

.hero-overlay {
    background: linear-gradient(
        120deg,
        rgba(1, 61, 116, 0.95) 0%,
        rgba(1, 61, 116, 0.72) 45%,
        rgba(4, 168, 188, 0.6) 100%
    );
}

.hero-pattern {
    background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px);
    background-size: 22px 22px;
}

.hero-card {
    background: rgba(255, 255, 255, 0.92);
    border-radius: var(--radius-xl);
    padding: 28px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(8px);
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-accent,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-primary {
    padding: 0.95rem 2.1rem;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-secondary) 0%, #017e8e 100%);
    box-shadow: 0 10px 24px rgba(4, 168, 188, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(4, 168, 188, 0.45);
}

.btn-secondary {
    padding: 0.95rem 2.1rem;
    color: var(--brand-primary);
    background: #ffffff;
    border: 2px solid rgba(1, 61, 116, 0.25);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-accent {
    padding: 0.95rem 2.1rem;
    color: var(--brand-primary);
    background: linear-gradient(135deg, var(--brand-accent) 0%, #f2b53b 100%);
    box-shadow: 0 10px 24px rgba(253, 198, 86, 0.35);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(253, 198, 86, 0.45);
}

.btn-ghost {
    padding: 0.85rem 1.8rem;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.08);
}

.btn-ghost:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.18);
}

.btn-sm {
    padding: 0.65rem 1.4rem;
    font-size: 0.95rem;
}

/* Sections */
.section-padding {
    padding: clamp(3.5rem, 6vw, 6.5rem) 0;
    position: relative;
}

.section-title {
    font-size: clamp(2rem, 2.4vw, 2.9rem);
    font-weight: 700;
    color: var(--brand-primary);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 42rem;
    margin: 0 auto;
}

.section-light {
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.section-soft {
    background: linear-gradient(180deg, #f0f7ff 0%, #e7f4ff 100%);
}

.section-ink {
    background:
        radial-gradient(circle at 10% 20%, rgba(4, 168, 188, 0.35), transparent 55%),
        linear-gradient(135deg, #012a4f 0%, #013d74 55%, #015f78 100%);
    color: #fff;
}

.section-teal {
    background: linear-gradient(135deg, #017e8e 0%, var(--brand-secondary) 55%, #04a8bc 100%);
    color: #fff;
}

.section-gold {
    background: linear-gradient(135deg, #fdc656 0%, #f5b43c 55%, #f9d27d 100%);
    color: var(--brand-primary);
}

/* Cards */
.service-card,
.feature-card,
.trust-indicator,
.info-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(1, 61, 116, 0.12);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card {
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    border: 2px solid transparent;
    background: linear-gradient(135deg, rgba(4, 168, 188, 0.45), rgba(253, 198, 86, 0.35)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

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

.service-card .icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    background: rgba(4, 168, 188, 0.12);
    transition: transform 0.3s ease, background 0.3s ease;
}

.service-card:hover .icon-wrapper {
    transform: translateY(-3px) scale(1.05);
    background: rgba(4, 168, 188, 0.2);
}

.feature-card {
    padding: 1.75rem;
    text-align: left;
}

.feature-card .icon-wrapper {
    width: 62px;
    height: 62px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(1, 61, 116, 0.08);
    margin-bottom: 1rem;
}

.trust-indicator {
    padding: 1.5rem;
    text-align: center;
}

.trust-indicator .icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    background: rgba(4, 168, 188, 0.12);
}

.info-card {
    padding: 1.5rem;
}

/* Trust badges */
.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 0.9rem;
    backdrop-filter: blur(6px);
}

/* Forms */
.form-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--brand-primary);
    margin-bottom: 0.4rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(1, 61, 116, 0.18);
    background: #fff;
    color: var(--ink);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: rgba(4, 168, 188, 0.7);
    box-shadow: 0 0 0 4px rgba(4, 168, 188, 0.12);
}

.form-input.error,
.form-select.error,
.form-textarea.error {
    border-color: #dc2626;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

.form-input.success,
.form-select.success,
.form-textarea.success {
    border-color: #16a34a;
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2351627a' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.85rem center;
    background-repeat: no-repeat;
    background-size: 1.25rem 1.25rem;
    padding-right: 2.5rem;
}

.form-checkbox {
    width: 1rem;
    height: 1rem;
    accent-color: var(--brand-secondary);
}

.form-error-message {
    color: #dc2626;
    font-size: 0.85rem;
    margin-top: 0.35rem;
}

/* FAQ */
.faq-item {
    border-bottom: 1px solid rgba(1, 61, 116, 0.12);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 0;
    text-align: left;
    font-weight: 600;
    color: var(--brand-primary);
}

.faq-question svg {
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 1rem;
}

.faq-question.active svg {
    transform: rotate(180deg);
}

.faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s ease;
}

.faq-answer.open {
    grid-template-rows: 1fr;
}

.faq-answer-content {
    overflow: hidden;
    color: var(--muted);
    padding-bottom: 0;
}

.faq-answer.open .faq-answer-content {
    padding-bottom: 1.2rem;
}

/* Newsletter */
.newsletter-form {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.newsletter-input {
    flex: 1;
    min-width: 220px;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

/* Scroll animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Modal */
#consultation-modal {
    transition: opacity 0.3s ease;
}

#consultation-modal .modal-backdrop {
    transition: backdrop-filter 0.3s ease;
}

#consultation-modal.active {
    display: flex;
}

#consultation-modal.active .modal-backdrop {
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

#modal-content {
    transition: all 0.35s ease;
}

#consultation-modal.active #modal-content {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Back to top */
#back-to-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--brand-secondary) 0%, #017e8e 100%);
    box-shadow: 0 10px 24px rgba(4, 168, 188, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all 0.3s ease;
    z-index: 50;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(4, 168, 188, 0.5);
}

/* Utility */
.area-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 0.9rem;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    background: var(--brand-primary);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    z-index: 999;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 1rem;
}

.btn-loading {
    pointer-events: none;
    opacity: 0.8;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Mobile Menu */
#mobile-menu {
    transition: max-height 0.3s ease, opacity 0.3s ease;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

#mobile-menu:not(.hidden) {
    max-height: 100vh;
    opacity: 1;
}

#mobile-menu-btn {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

#mobile-menu-btn:active {
    transform: scale(0.95);
}

/* Active navigation link */
nav a.active,
#mobile-menu a.active {
    color: var(--brand-secondary);
}

nav a.active::after {
    width: 100%;
}

/* Body scroll lock when mobile menu is open */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Responsive */
@media (max-width: 1024px) {
    /* Ensure mobile menu button is always visible and tappable */
    #mobile-menu-btn {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    #main-header .main-nav-container {
        height: 76px;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .hero-card {
        padding: 22px;
    }

    .newsletter-form {
        flex-direction: column;
        align-items: stretch;
    }

    /* Mobile touch targets - minimum 44px */
    .btn-primary,
    .btn-secondary,
    .btn-accent,
    .btn-ghost {
        min-height: 48px;
        padding: 0.85rem 1.8rem;
    }

    .btn-sm {
        min-height: 44px;
        padding: 0.65rem 1.2rem;
    }

    /* Mobile menu items */
    #mobile-menu a {
        min-height: 48px;
        display: flex;
        align-items: center;
    }

    /* Form inputs on mobile */
    .form-input,
    .form-select,
    .form-textarea {
        font-size: 16px; /* Prevents iOS zoom on focus */
        min-height: 48px;
    }

    /* Better spacing for mobile */
    .section-padding {
        padding: 2.5rem 0;
    }

    /* Adjust cards for mobile */
    .service-card,
    .feature-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    #mobile-menu .btn-primary,
    #mobile-menu .btn-secondary {
        font-size: 1rem;
        padding: 1rem 1.5rem;
    }

    /* Reduce header logo on small screens */
    #main-header img {
        max-height: 60px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* Print */
@media print {
    header, footer, .no-print {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    a {
        text-decoration: underline;
    }
}
