/* ============================================
   S. Balida-Castañeda Funeral Parlor
   Stylesheet
   ============================================ */

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

:root {
    --color-primary: #1a1a2e;
    --color-primary-light: #2d2d4a;
    --color-secondary: #c9a96e;
    --color-secondary-light: #e8d5a3;
    --color-accent: #8b6f3e;
    --color-bg: #faf8f5;
    --color-bg-alt: #f0ece6;
    --color-text: #2c2c2c;
    --color-text-light: #6b6b6b;
    --color-white: #ffffff;
    --color-dark: #0d0d1a;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --transition: 0.3s ease;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
    --radius: 12px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.7;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ----- Typography ----- */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
}

a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--color-accent);
}

img {
    max-width: 100%;
    height: auto;
}

/* ----- Buttons ----- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: var(--color-secondary);
    color: var(--color-primary);
    border-color: var(--color-secondary);
}

.btn-primary:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(201, 169, 110, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--color-white);
    border-color: var(--color-white);
}

.btn-secondary:hover {
    background: var(--color-white);
    color: var(--color-primary);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
}

/* ----- Section Headers ----- */
.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-tag {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--color-secondary);
    margin-bottom: 12px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 16px;
}

.divider {
    font-size: 1.5rem;
    opacity: 0.6;
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    transition: var(--transition);
    padding: 16px 0;
}

.navbar.scrolled {
    background: var(--color-primary);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
    padding: 10px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    font-size: 1.8rem;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-white);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    font-weight: 400;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    padding-bottom: 4px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-secondary);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-secondary);
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-white);
    transition: var(--transition);
    border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   HERO
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 50%, #1a1a3e 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(201, 169, 110, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(201, 169, 110, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(201, 169, 110, 0.06) 0%, transparent 50%);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a96e' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(201, 169, 110, 0.15);
    border: 1px solid rgba(201, 169, 110, 0.3);
    border-radius: 50px;
    color: var(--color-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 1px;
    margin-bottom: 32px;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 24px;
    letter-spacing: -0.5px;
}

.hero-highlight {
    color: var(--color-secondary);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.75);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   ABOUT
   ============================================ */
.about {
    padding: 120px 0 80px;
    background: var(--color-white);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.about-content p {
    font-size: 1.05rem;
    color: var(--color-text-light);
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-content strong {
    color: var(--color-primary);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 36px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: var(--color-bg);
    border-radius: var(--radius);
    border: 1px solid rgba(201, 169, 110, 0.15);
}

.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-secondary);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.about-image {
    display: flex;
    justify-content: center;
}

.image-frame {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 4/5;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    position: relative;
}

.placeholder-img {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    text-align: center;
    padding: 40px;
}

.placeholder-img span {
    font-size: 4rem;
    margin-bottom: 20px;
}

.placeholder-img p {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    line-height: 1.6;
    opacity: 0.8;
}

/* ============================================
   VALUES
   ============================================ */
.values {
    padding: 80px 0;
    background: var(--color-bg);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.value-card {
    text-align: center;
    padding: 36px 24px;
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid transparent;
}

.value-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(201, 169, 110, 0.2);
}

.value-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.value-card h3 {
    font-size: 1.1rem;
    color: var(--color-primary);
    margin-bottom: 10px;
}

.value-card p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.6;
}

/* ============================================
   SERVICES
   ============================================ */
.services {
    padding: 120px 0;
    background: var(--color-white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.service-card {
    padding: 40px 32px;
    background: var(--color-bg);
    border-radius: var(--radius);
    border: 1px solid transparent;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: var(--color-secondary);
    transition: var(--transition);
}

.service-card:hover {
    border-color: rgba(201, 169, 110, 0.2);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.service-card:hover::before {
    height: 100%;
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.service-card h3 {
    font-size: 1.2rem;
    color: var(--color-primary);
    margin-bottom: 12px;
}

.service-card p {
    font-size: 0.95rem;
    color: var(--color-text-light);
    line-height: 1.7;
}

/* ============================================
   CONTACT
   ============================================ */
.contact {
    padding: 120px 0 80px;
    background: var(--color-bg);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 48px;
}

.contact-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-content: start;
}

.contact-card {
    padding: 24px;
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.contact-icon {
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.contact-card h3 {
    font-size: 1rem;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.contact-card p,
.contact-card a {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.6;
}

.contact-card a:hover {
    color: var(--color-secondary);
}

.phone-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.phone-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--color-bg);
    border: 1px solid rgba(201, 169, 110, 0.2);
    border-radius: 8px;
    text-decoration: none;
    transition: var(--transition);
}

.phone-btn:hover {
    background: var(--color-secondary);
    border-color: var(--color-secondary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(201, 169, 110, 0.2);
}

.phone-btn:hover .phone-label,
.phone-btn:hover .phone-number {
    color: var(--color-primary);
}

.phone-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--color-text-light);
    letter-spacing: 0.3px;
}

.phone-number {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary);
    font-family: var(--font-heading);
}

.contact-note {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-secondary);
    background: rgba(201, 169, 110, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

/* ----- Form ----- */
.contact-form-wrapper {
    background: var(--color-white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    border: 2px solid #e8e4de;
    border-radius: 8px;
    background: var(--color-bg);
    transition: var(--transition);
    color: var(--color-text);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-secondary);
    background: var(--color-white);
    box-shadow: 0 0 0 4px rgba(201, 169, 110, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #aaa;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--color-primary);
    color: rgba(255, 255, 255, 0.7);
    padding: 64px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-logo {
    font-size: 2rem;
    display: block;
    margin-bottom: 12px;
}

.footer-brand h3 {
    font-family: var(--font-heading);
    color: var(--color-white);
    font-size: 1.2rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

.footer-brand p {
    font-size: 0.9rem;
}

.footer-links h4,
.footer-social h4 {
    font-family: var(--font-heading);
    color: var(--color-white);
    font-size: 1.1rem;
    margin-bottom: 16px;
}

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

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    transition: var(--transition);
}

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

.social-links {
    display: flex;
    gap: 12px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-white);
    transition: var(--transition);
}

.social-link:hover {
    background: var(--color-secondary);
    color: var(--color-primary);
    transform: translateY(-2px);
}

.footer-bottom {
    padding: 24px 0;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}

/* ============================================
   FORM FEEDBACK
   ============================================ */
.form-feedback {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    display: none;
}

.form-feedback.success {
    display: block;
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #2e7d32;
}

.form-feedback.error {
    display: block;
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    color: #c62828;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Navigation */
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--color-primary);
        flex-direction: column;
        padding: 80px 40px 40px;
        gap: 24px;
        transition: 0.4s ease;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-link {
        font-size: 1.1rem;
    }

    /* Hero */
    .hero-content h1 {
        font-size: 2.5rem;
    }

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

    /* About */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .about-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Values */
    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-info {
        grid-template-columns: 1fr 1fr;
    }

    .contact-form-wrapper {
        padding: 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 32px;
    }

    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .about-stats,
    .values-grid,
    .contact-info {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}
