/* ============================================
   Casa De La Paz Independent Living
   Design System & Stylesheet
   ============================================ */

/* ============================================
   CSS Custom Properties (Design Tokens)
   ============================================ */
:root {
    /* Primary Colors */
    --peaceful-blue: #4A90A4;
    --peaceful-blue-dark: #3D7A8A;
    --peaceful-blue-darker: #356876;
    --warm-taupe: #8B7E74;
    
    /* Secondary Colors */
    --soft-sage: #9CAF88;
    --gentle-gold: #C9A961;
    
    /* Neutral Colors */
    --warm-white: #F8F6F3;
    --light-beige: #E8E3DC;
    --soft-gray: #A39B93;
    --charcoal-gray: #3D3D3D;
    --deep-brown: #2C2520;
    
    /* Semantic Colors */
    --success: #7A9D6F;
    --warning: #D4A574;
    --info: #6B9AAE;
    --error: #A97C7C;
    
    /* Typography */
    --font-heading: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
    --font-body: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
    --font-accent: 'Lora', Georgia, serif;
    
    /* Spacing Scale */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --space-4xl: 96px;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-pill: 999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 4px rgba(61, 61, 61, 0.06);
    --shadow-md: 0 2px 8px rgba(61, 61, 61, 0.08);
    --shadow-lg: 0 4px 16px rgba(61, 61, 61, 0.12);
    --shadow-xl: 0 4px 24px rgba(61, 61, 61, 0.1);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0.0, 0.2, 1);
    --transition-medium: 300ms cubic-bezier(0.4, 0.0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* ============================================
   CSS Reset & Base Styles
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--charcoal-gray);
    background-color: var(--warm-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--deep-brown);
    line-height: 1.3;
    margin-bottom: var(--space-md);
}

h1 {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

h2 {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

h3 {
    font-size: 28px;
    font-weight: 700;
}

h4 {
    font-size: 22px;
    font-weight: 700;
    font-family: var(--font-body);
}

h5 {
    font-size: 18px;
    font-weight: 700;
    font-family: var(--font-body);
    letter-spacing: 0.2px;
}

p {
    margin-bottom: var(--space-md);
}

a {
    color: var(--peaceful-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--peaceful-blue-dark);
}

a:focus-visible {
    outline: 2px solid var(--peaceful-blue);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ============================================
   Layout Utilities
   ============================================ */
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--space-xl);
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 var(--space-2xl);
    }
}

/* ============================================
   Navigation Header
   ============================================ */
.site-header {
    background-color: var(--warm-white);
    border-bottom: 1px solid rgba(163, 155, 147, 0.3);
    padding: var(--space-md) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--deep-brown);
}

.logo i {
    font-size: 28px;
    color: var(--peaceful-blue);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
}

.mobile-menu-toggle:focus-visible {
    outline: 2px solid var(--peaceful-blue);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--deep-brown);
    position: relative;
    transition: background-color var(--transition-fast);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background-color: var(--deep-brown);
    transition: transform var(--transition-fast);
}

.hamburger::before {
    top: -7px;
}

.hamburger::after {
    top: 7px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--space-sm);
    align-items: center;
}

.nav-link {
    font-size: 16px;
    font-weight: 600;
    color: var(--deep-brown);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    display: block;
}

.nav-link:hover {
    color: var(--peaceful-blue);
    background-color: rgba(74, 144, 164, 0.1);
}

.nav-link.active {
    color: var(--peaceful-blue);
    border-bottom: 2px solid var(--peaceful-blue);
}

@media (max-width: 767px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--warm-white);
        flex-direction: column;
        gap: 0;
        padding: var(--space-md);
        box-shadow: var(--shadow-lg);
        display: none;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-link {
        width: 100%;
        text-align: left;
    }
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
    min-height: 44px;
    justify-content: center;
}

.btn-primary {
    background-color: var(--peaceful-blue);
    color: var(--warm-white);
}

.btn-primary:hover {
    background-color: var(--peaceful-blue-dark);
    color: var(--warm-white);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 144, 164, 0.3);
}

.btn-primary:active {
    background-color: var(--peaceful-blue-darker);
    transform: translateY(0);
}

.btn-secondary {
    background-color: transparent;
    color: var(--warm-white);
    border: 2px solid var(--warm-white);
    /* color: var(--peaceful-blue); */
    /* border: 2px solid var(--peaceful-blue); */
    padding: 10px 24px;
}

.btn-secondary:hover {
    background-color: rgba(74, 144, 164, 0.1);
    /* border-color: var(--peaceful-blue-dark); */
    /* color: var(--peaceful-blue-dark); */
    color: var(--gentle-gold);
    border-color:var(--gentle-gold);
}

/* ============================================
   Hero Section
   ============================================ */
.hero-section {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, var(--peaceful-blue) 0%, var(--warm-taupe) 100%);
    background-image: 
        linear-gradient(135deg, rgba(74, 144, 164, 0.85) 0%, rgba(139, 126, 116, 0.85) 100%),
        url('../img/care.jpeg');
    background-size: cover, cover;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(74, 144, 164, 0.3) 0%, transparent 60%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    padding: var(--space-2xl) var(--space-md);
}

.hero-title {
    font-size: clamp(32px, 5vw, 56px);
    color: var(--warm-white);
    margin-bottom: var(--space-md);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-tagline {
    font-family: var(--font-accent);
    font-size: clamp(24px, 3vw, 32px);
    font-style: italic;
    color: var(--light-beige);
    margin-bottom: var(--space-lg);
    font-weight: 500;
}

.hero-description {
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.7;
    color: var(--warm-white);
    margin-bottom: var(--space-2xl);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%);
    color: var(--warm-white);
    font-size: 24px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ============================================
   Section Headers
   ============================================ */
.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    margin-bottom: var(--space-md);
}

.section-subtitle {
    font-size: 18px;
    line-height: 1.7;
    color: var(--soft-gray);
}

/* ============================================
   Who We Serve Section
   ============================================ */
.who-we-serve-section {
    padding: var(--space-3xl) 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.service-card {
    background-color: var(--warm-white);
    border: 1px solid rgba(163, 155, 147, 0.3);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-medium);
    text-align: center;
}

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

.icon-container {
    width: 56px;
    height: 56px;
    background-color: rgba(74, 144, 164, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-md);
    font-size: 24px;
    color: var(--peaceful-blue);
}

.service-card h3 {
    font-size: 22px;
    margin-bottom: var(--space-md);
    color: var(--deep-brown);
}

.service-card p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--charcoal-gray);
    margin-bottom: 0;
}

/* ============================================
   Why Choose Us Section
   ============================================ */
.why-choose-section {
    background-color: var(--light-beige);
    padding: var(--space-3xl) 0;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
}

@media (min-width: 768px) {
    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.value-card {
    background-color: #FFFFFF;
    border-left: 4px solid var(--gentle-gold);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-medium);
}

.value-card:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.value-icon {
    width: 48px;
    height: 48px;
    background-color: rgba(201, 169, 97, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
    font-size: 24px;
    color: var(--gentle-gold);
}

.value-card h3 {
    font-size: 22px;
    margin-bottom: var(--space-sm);
    color: var(--deep-brown);
}

.value-card p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--charcoal-gray);
    margin-bottom: 0;
}

/* ============================================
   Process Section
   ============================================ */
.process-section {
    padding: var(--space-3xl) 0;
    background-color: var(--warm-white);
}

.process-steps {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    max-width: 1000px;
    margin: 0 auto var(--space-2xl);
}

@media (min-width: 1024px) {
    .process-steps {
        flex-direction: row;
        align-items: flex-start;
    }
}

.process-step {
    flex: 1;
    text-align: center;
}

.step-number {
    width: 56px;
    height: 56px;
    background-color: var(--peaceful-blue);
    color: var(--warm-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    font-family: var(--font-heading);
    margin: 0 auto var(--space-md);
    box-shadow: 0 4px 12px rgba(74, 144, 164, 0.3);
}

.step-content h3 {
    font-size: 22px;
    margin-bottom: var(--space-sm);
    color: var(--deep-brown);
}

.step-content p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--charcoal-gray);
    margin-bottom: 0;
}

.step-connector {
    display: none;
}

@media (min-width: 1024px) {
    .step-connector {
        display: block;
        flex: 0 0 60px;
        height: 2px;
        background: repeating-linear-gradient(
            to right,
            var(--soft-sage) 0,
            var(--soft-sage) 8px,
            transparent 8px,
            transparent 16px
        );
        align-self: center;
        margin-top: -60px;
    }
}

.process-callout {
    background-color: rgba(107, 154, 174, 0.1);
    border-left: 4px solid var(--info);
    padding: var(--space-md) var(--space-lg);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    max-width: 800px;
    margin: 0 auto;
}

.process-callout i {
    font-size: 24px;
    color: var(--info);
    flex-shrink: 0;
    margin-top: 2px;
}

.process-callout p {
    margin-bottom: 0;
    color: var(--charcoal-gray);
}

/* ============================================
   CTA Section
   ============================================ */
.cta-section {
    background: linear-gradient(135deg, rgba(74, 144, 164, 0.95) 0%, rgba(139, 126, 116, 0.95) 100%);
    padding: var(--space-4xl) 0;
    text-align: center;
}

.cta-content {
    max-width: 900px;
    margin: 0 auto;
}

.cta-section h2 {
    color: var(--warm-white);
    font-size: clamp(32px, 4vw, 42px);
    margin-bottom: var(--space-md);
}

.cta-description {
    font-size: 18px;
    line-height: 1.7;
    color: var(--light-beige);
    margin-bottom: var(--space-2xl);
}

.cta-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-3xl);
}

.cta-section .btn-primary {
    background-color: var(--warm-white);
    color: var(--peaceful-blue);
}

.cta-section .btn-primary:hover {
    background-color: var(--light-beige);
    color: var(--peaceful-blue-dark);
}

.cta-section .btn-secondary {
    border-color: var(--warm-white);
    color: var(--warm-white);
}

.cta-section .btn-secondary:hover {
    background-color: rgba(248, 246, 243, 0.15);
    border-color: var(--warm-white);
}

.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-xl);
    margin-top: var(--space-3xl);
    text-align: left;
}

.contact-item {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
}

.contact-item i {
    font-size: 24px;
    color: var(--gentle-gold);
    flex-shrink: 0;
    margin-top: 4px;
}

.contact-item strong {
    display: block;
    color: var(--warm-white);
    font-weight: 600;
    margin-bottom: var(--space-xs);
    font-size: 16px;
}

.contact-item p {
    color: var(--light-beige);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 0;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    background-color: var(--deep-brown);
    color: var(--light-beige);
    padding: var(--space-2xl) 0 var(--space-lg);
    border-top: 4px solid var(--peaceful-blue);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--light-beige);
    margin-bottom: var(--space-md);
}

.footer-logo i {
    font-size: 28px;
    color: var(--soft-sage);
}

.footer-tagline {
    font-family: var(--font-accent);
    font-style: italic;
    color: var(--gentle-gold);
    font-size: 16px;
    margin-bottom: var(--space-sm);
}

.footer-description {
    font-size: 14px;
    line-height: 1.6;
    color: var(--soft-gray);
}

.footer-column h4 {
    color: var(--warm-white);
    font-size: 18px;
    margin-bottom: var(--space-md);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    color: var(--soft-sage);
    font-size: 15px;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--gentle-gold);
}

.footer-contact {
    list-style: none;
}

.footer-contact li {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    font-size: 14px;
}

.footer-contact i {
    color: var(--soft-sage);
    flex-shrink: 0;
    margin-top: 2px;
}

.social-links {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(156, 175, 136, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--soft-sage);
    font-size: 18px;
    transition: all var(--transition-fast);
}

.social-link:hover {
    background-color: var(--soft-sage);
    color: var(--deep-brown);
    transform: translateY(-2px);
}

.footer-social-text {
    font-size: 14px;
    color: var(--soft-gray);
}

.footer-bottom {
    border-top: 1px solid rgba(163, 155, 147, 0.3);
    padding-top: var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
    font-size: 14px;
    color: var(--soft-gray);
}

.footer-legal {
    display: flex;
    gap: var(--space-md);
    align-items: center;
}

.footer-legal a {
    color: var(--soft-sage);
    font-size: 14px;
}

.footer-legal a:hover {
    color: var(--gentle-gold);
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 767px) {
    h1 {
        font-size: 32px;
    }
    
    h2 {
        font-size: 28px;
    }
    
    h3 {
        font-size: 22px;
    }
    
    .hero-section {
        min-height: 500px;
    }
    
    .who-we-serve-section,
    .why-choose-section,
    .process-section,
    .cta-section {
        padding: var(--space-2xl) 0;
    }
    
    .section-header {
        margin-bottom: var(--space-2xl);
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================
   Accessibility Enhancements
   ============================================ */
.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;
}

/* Focus styles for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--peaceful-blue);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Ensure minimum touch target size */
button, a, input, select, textarea {
    min-height: 44px;
    min-width: 44px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --peaceful-blue: #2D6B7D;
        --charcoal-gray: #000000;
        --warm-white: #FFFFFF;
    }
}
