/* =============================================
   MAAMADURAI SMART HOMES - MAIN STYLES
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700&family=Noto+Sans+Tamil:wght@400;500;600;700&display=swap');

/* ---------- Header & Navigation ---------- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-sticky);
    padding: var(--space-4) 0;
    transition: all var(--transition-base);
    /* Glassmorphic dark background for visibility on hero */
    background: rgba(26, 15, 10, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header.scrolled {
    background: rgba(253, 248, 243, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    padding: var(--space-2) 0;
}

/* Header text colors change when scrolled */
.header .logo-text {
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.header .logo-text span {
    color: rgba(255, 255, 255, 0.75);
}

.header.scrolled .logo-text {
    color: var(--primary-dark);
    text-shadow: none;
}

.header.scrolled .logo-text span {
    color: var(--neutral-600);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-premium);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: var(--font-bold);
    font-size: var(--text-xl);
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: var(--font-bold);
    font-size: var(--text-lg);
    color: var(--primary-dark);
    line-height: 1.2;
}

.logo-text span {
    display: block;
    font-size: var(--text-xs);
    font-weight: var(--font-normal);
    color: var(--neutral-600);
}

/* Navigation */
.nav {
    display: none;
}

@media (min-width: 1024px) {
    .nav {
        display: flex;
        align-items: center;
        gap: var(--space-8);
    }
}

.nav-link {
    font-family: var(--font-heading);
    font-weight: var(--font-medium);
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.9);
    transition: color var(--transition-fast);
    position: relative;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-gold);
}

/* Scrolled state - dark text */
.header.scrolled .nav-link {
    color: var(--neutral-700);
    text-shadow: none;
}

.header.scrolled .nav-link:hover,
.header.scrolled .nav-link.active {
    color: var(--primary-dark);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gold);
    transition: width var(--transition-base);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

/* Language Switcher */
.lang-switch {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
    padding: var(--space-1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header.scrolled .lang-switch {
    background: var(--neutral-100);
    border-color: transparent;
}

.lang-btn {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    border: none;
    background: transparent;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
    color: rgba(255, 255, 255, 0.9);
}

.header.scrolled .lang-btn {
    color: var(--neutral-700);
}

.lang-btn.active {
    background: var(--accent-gold);
    color: var(--primary-dark);
}

.header.scrolled .lang-btn.active {
    background: var(--primary-dark);
    color: white;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: var(--space-2);
    background: none;
    border: none;
    cursor: pointer;
}

@media (min-width: 1024px) {
    .menu-toggle {
        display: none;
    }
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: white;
    transition: all var(--transition-fast);
}

.header.scrolled .menu-toggle span {
    background: var(--primary-dark);
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    inset: 0;
    background: white;
    z-index: var(--z-modal);
    padding: var(--space-20) var(--space-6);
    transform: translateX(100%);
    transition: transform var(--transition-base);
}

.mobile-nav.open {
    transform: translateX(0);
}

.mobile-nav-close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    width: 40px;
    height: 40px;
    background: var(--neutral-100);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: var(--text-xl);
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.mobile-nav-link {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    color: var(--primary-dark);
}

/* ---------- Hero Section ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, #1a0f0a 0%, #2C1810 50%, #3d2317 100%);
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(44, 24, 16, 0.9) 0%,
            rgba(44, 24, 16, 0.6) 50%,
            rgba(44, 24, 16, 0.8) 100%);
    z-index: 2;
}

/* 3D Elements Layer */
.hero-3d-layer {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

.hero-shape {
    position: absolute;
    border-radius: var(--radius-2xl);
    background: var(--gradient-gold);
    opacity: 0.1;
}

.hero-shape-1 {
    width: 400px;
    height: 400px;
    top: 10%;
    right: -100px;
    transform: rotate(45deg);
    animation: float 8s ease-in-out infinite;
}

.hero-shape-2 {
    width: 200px;
    height: 200px;
    bottom: 20%;
    left: 10%;
    transform: rotate(-15deg);
    animation: float 6s ease-in-out infinite reverse;
}

.hero-shape-3 {
    width: 150px;
    height: 150px;
    top: 40%;
    left: 30%;
    transform: rotate(30deg);
    animation: float 7s ease-in-out infinite 0.5s;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 600px;
    padding: var(--space-20) 0;
}

@media (min-width: 1024px) {
    .hero-content {
        max-width: 50%;
        padding-right: var(--space-8);
    }
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: rgba(197, 165, 114, 0.2);
    border: 1px solid var(--accent-gold);
    border-radius: var(--radius-full);
    color: var(--accent-gold);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    margin-bottom: var(--space-6);
}

.hero-title {
    color: white;
    margin-bottom: var(--space-6);
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-title .highlight {
    color: var(--accent-gold);
}

.hero-description {
    font-size: var(--text-lg);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--space-8);
    max-width: 600px;
    line-height: var(--leading-relaxed);
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    margin-bottom: var(--space-12);
}

.hero-stats {
    display: flex;
    gap: var(--space-8);
    padding-top: var(--space-8);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    font-family: var(--font-heading);
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    color: var(--accent-gold);
    display: block;
}

.hero-stat-label {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.6);
}

.hero-scroll {
    position: absolute;
    bottom: var(--space-8);
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    color: rgba(255, 255, 255, 0.6);
    font-size: var(--text-sm);
}

/* ---------- Services Section ---------- */
.services-section {
    background: var(--neutral-50);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: var(--space-6);
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.service-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    transition: all var(--transition-base);
    border: 1px solid var(--neutral-200);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-gold);
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.service-icon {
    width: 64px;
    height: 64px;
    background: var(--neutral-100);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-4);
    font-size: 28px;
    transition: all var(--transition-base);
}

.service-card:hover .service-icon {
    background: var(--gradient-premium);
    color: white;
}

.service-title {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--primary-dark);
    margin-bottom: var(--space-3);
}

.service-description {
    color: var(--neutral-600);
    margin-bottom: var(--space-4);
    line-height: var(--leading-relaxed);
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--primary-wood);
    font-weight: var(--font-medium);
    font-size: var(--text-sm);
}

.service-link:hover {
    color: var(--primary-dark);
}

/* ---------- About Preview ---------- */
.about-preview {
    background: var(--primary-dark);
    color: white;
    position: relative;
    overflow: hidden;
}

.about-preview-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-12);
    align-items: center;
}

@media (min-width: 1024px) {
    .about-preview-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.about-preview-image {
    position: relative;
    border-radius: var(--radius-2xl);
    overflow: hidden;
}

.about-preview-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.about-preview-content .section-tag {
    color: var(--accent-gold);
}

.about-preview-content .heading-2 {
    color: white;
    margin-bottom: var(--space-6);
}

.about-preview-content p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--space-8);
    line-height: var(--leading-relaxed);
}

.about-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}

.about-feature {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.about-feature-icon {
    width: 40px;
    height: 40px;
    background: rgba(197, 165, 114, 0.2);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-gold);
}

.about-feature-text {
    font-weight: var(--font-medium);
}

/* ---------- Projects Gallery ---------- */
.projects-section {
    background: var(--neutral-100);
}

.projects-filters {
    display: flex;
    justify-content: center;
    gap: var(--space-2);
    margin-bottom: var(--space-10);
    flex-wrap: wrap;
}

.filter-btn {
    padding: var(--space-2) var(--space-5);
    background: transparent;
    border: 2px solid var(--neutral-300);
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-weight: var(--font-medium);
    font-size: var(--text-sm);
    color: var(--neutral-600);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: var(--space-6);
}

@media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.project-card {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.project-card:hover img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(44, 24, 16, 0.9), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--space-6);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-category {
    font-size: var(--text-xs);
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-2);
}

.project-title {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: white;
}

/* ---------- Testimonials ---------- */
.testimonials-section {
    background: white;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
}

@media (min-width: 768px) {
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.testimonial-card {
    background: var(--neutral-50);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    position: relative;
}

.testimonial-quote {
    font-size: 48px;
    color: var(--accent-gold);
    line-height: 1;
    margin-bottom: var(--space-4);
}

.testimonial-text {
    color: var(--neutral-700);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-6);
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.testimonial-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--gradient-premium);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: var(--font-bold);
}

.testimonial-name {
    font-weight: var(--font-semibold);
    color: var(--primary-dark);
}

.testimonial-location {
    font-size: var(--text-sm);
    color: var(--neutral-500);
}

.testimonial-rating {
    display: flex;
    gap: var(--space-1);
    margin-top: var(--space-2);
    color: var(--accent-gold);
}

/* ---------- CTA Section ---------- */
.cta-section {
    background: var(--gradient-premium);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 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='%23ffffff' fill-opacity='0.05'%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");
}

.cta-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
}

.cta-title {
    margin-bottom: var(--space-4);
}

.cta-description {
    opacity: 0.9;
    margin-bottom: var(--space-8);
    font-size: var(--text-lg);
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
    flex-wrap: wrap;
}

/* ---------- Footer ---------- */
.footer {
    background: var(--neutral-900);
    color: white;
    padding: var(--space-16) 0 var(--space-8);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-10);
    margin-bottom: var(--space-12);
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.footer-description {
    color: var(--neutral-400);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-6);
}

.footer-social {
    display: flex;
    gap: var(--space-3);
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--neutral-800);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: var(--accent-gold);
    color: var(--primary-dark);
}

.footer-heading {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    margin-bottom: var(--space-6);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.footer-link {
    color: var(--neutral-400);
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: var(--accent-gold);
}

.footer-contact-item {
    display: flex;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    color: var(--neutral-400);
}

.footer-contact-icon {
    color: var(--accent-gold);
}

.footer-bottom {
    padding-top: var(--space-8);
    border-top: 1px solid var(--neutral-800);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    align-items: center;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer-bottom p {
    color: var(--neutral-500);
    font-size: var(--text-sm);
}

/* ---------- Sticky Contact Buttons ---------- */
.sticky-buttons {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    z-index: var(--z-fixed);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.sticky-btn {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
    border: none;
    cursor: pointer;
}

.sticky-btn:hover {
    transform: scale(1.1);
}

.sticky-whatsapp {
    background: #25D366;
}

.sticky-call {
    background: var(--primary-wood);
}

/* ---------- Skip to Content (Accessibility) ---------- */
.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-4);
    background: var(--primary-dark);
    color: white;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-md);
    z-index: 9999;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: var(--space-4);
}