/* ---
   Main Stylesheet for Mahadeva Arc
   Version: FINAL_v3
--- */

/* --- Modern CSS Reset --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--body-font); background-color: var(--bg-dark); color: var(--text-light); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-family: var(--heading-font); }
img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }

:focus-visible {
    outline: 2px solid var(--accent-color-hover);
    outline-offset: 2px;
    border-radius: 2px;
}

@keyframes fadeInPage {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- Global Styles & Variables --- */
:root {
    --bg-dark: #111827;
    --bg-medium: #1F2937;
    --text-light: #F3F4F6;
    --text-medium: #9CA3AF;
    --accent-color: #D97706;
    --accent-color-hover: #FBBF24;
    --heading-font: 'Cormorant Garamond', serif;
    --body-font: 'Poppins', sans-serif;
}
body { animation: fadeInPage 0.8s ease-in-out; }
.site-wrapper { overflow-x: hidden; position: relative; }
main { overflow-x: hidden; }
body.no-scroll { overflow: hidden; }
.container { width: 90%; max-width: 1200px; margin: 0 auto; padding: 7rem 0; }
h1, h2, h3 { font-weight: 700; color: var(--text-light); letter-spacing: 1px; }
h2 { font-size: 3.2rem; text-align: center; margin-bottom: 1.5rem; }
.section-subtitle { text-align: center; color: var(--text-medium); max-width: 650px; margin: 0 auto 5rem auto; font-size: 1.1rem; font-weight: 300; line-height: 1.7; }

/* --- Header & Navigation --- */
.header { position: fixed; top: 0; left: 0; width: 100%; padding: 1.2rem 5%; background-color: rgba(17, 24, 39, 0.7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); z-index: 1000; display: flex; justify-content: space-between; align-items: center; transition: background-color 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease; }
.header.header-scrolled { background-color: rgba(31, 41, 55, 0.85); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); }
.logo-link { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo { display: block; height: 48px; width: auto; }
.logo-text { font-family: 'Poppins', sans-serif; font-weight: 400; font-size: 22px; letter-spacing: 1.5px; color: var(--text-light); }
.logo-text .accent { color: var(--accent-color); font-weight: 600; }
.nav-links { list-style: none; margin: 0; padding: 0; display: flex; }
.nav-links li { margin-left: 3rem; }
.nav-links a { color: var(--text-medium); text-decoration: none; font-weight: 400; font-size: 1rem; display: inline-block; transition: color 0.3s ease, transform 0.3s ease; position: relative; padding-bottom: 8px; }
.nav-links a.current-link { color: var(--text-light); }
.nav-links a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 1px; background-color: var(--accent-color); transform: scaleX(0); transform-origin: bottom right; transition: transform 0.4s cubic-bezier(0.86, 0, 0.07, 1); }

@media (hover: hover) {
    .nav-links a:hover { color: var(--text-light); transform: translateY(-2px); }
    .nav-links a:hover::after, .nav-links a.current-link:hover::after { transform: scaleX(1); transform-origin: bottom left; }
    .cta-button:hover { background-color: transparent; color: var(--accent-color); transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.2); }
    .about-image img:hover { filter: grayscale(0%); }
    .filter-btn:hover { background-color: var(--accent-color); border-color: var(--accent-color); color: var(--bg-dark); font-weight: 500; }
    .project-card-link:hover .project-card { transform: translateY(-12px); box-shadow: 0 25px 50px rgba(0,0,0,0.5); }
    .project-card-link:hover .project-card img { transform: scale(1.05); }
    .project-card-link:hover .card-cta { transform: translateX(5px); }
    .close-btn:hover { background-color: var(--accent-color); color: var(--bg-dark); transform: translateY(-2px); box-shadow: none; }
    .footer-column a:not(.logo-link):hover, .contact-info .info-item a:hover { color: var(--text-light); }
    .social-links a:hover { color: var(--accent-color); transform: scale(1.1); }
    .floating-cta:hover { animation: none; transform: scale(1.1); }
    .philosophy-item:hover { transform: translateY(-8px); }
    .back-to-top-btn:hover { transform: scale(1.1); }
}

.nav-links a.current-link::after { transform: scaleX(1); transform-origin: bottom left; }
.hamburger { display: none; cursor: pointer; background: none; border: none; padding: 0; }
.hamburger div { width: 25px; height: 2px; background-color: var(--text-light); margin: 6px 0; transition: all 0.4s ease; }

/* --- Hero Section --- */
.hero { height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; position: relative; padding: 0 5%; overflow: hidden; background-color: #000; }
.youtube-video-background { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; overflow: hidden; }
.youtube-video-background iframe,
.youtube-video-background video { position: absolute; top: 50%; left: 50%; width: 100vw; height: 56.25vw; min-height: 100vh; min-width: 177.77vh; transform: translate(-50%, -50%); pointer-events: none; object-fit: cover; }
.hero::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to bottom, rgba(17, 24, 39, 0.6) 0%, rgba(17, 24, 39, 0.2) 50%, rgba(17, 24, 39, 0.8) 100%); z-index: 2; }
.hero-content { position: relative; z-index: 3; }
.hero h1 { font-size: 5.5rem; line-height: 1.1; margin-bottom: 1.5rem; font-weight: 600; }
.hero p { font-size: 1.4rem; color: var(--text-light); opacity: 0.9; margin-bottom: 2.5rem; font-weight: 300; }
.cta-button { display: inline-flex; align-items: center; justify-content: center; background-color: var(--accent-color); color: var(--bg-dark); padding: 1.2rem 3rem; border-radius: 50px; text-decoration: none; font-weight: 500; font-size: 1.1rem; transition: all 0.4s ease; letter-spacing: 0.5px; border: 1px solid var(--accent-color); position: relative; overflow: hidden; z-index: 1; }
.cta-button::after { content: ''; position: absolute; top: 0; left: -150%; width: 120%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent); transform: skewX(-25deg); transition: left 0.8s cubic-bezier(0.165, 0.84, 0.44, 1); }
.cta-button:hover::after { left: 150%; }
.cta-button:disabled { opacity: 0.7; cursor: not-allowed; }
.video-mute-btn { position: absolute; bottom: 30px; right: 30px; z-index: 4; background-color: rgba(0, 0, 0, 0.4); border: 1px solid rgba(255, 255, 255, 0.5); color: white; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); transition: all 0.3s ease; }
.video-mute-btn:hover { background-color: rgba(0, 0, 0, 0.6); transform: scale(1.1); }
.video-mute-btn svg { width: 24px; height: 24px; }

/* --- Philosophy Section --- */
#philosophy { background-color: var(--bg-dark); }
.philosophy-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 3rem; text-align: center; }
.philosophy-item { padding: 2rem; transition: transform 0.4s ease; }
.philosophy-item svg { width: 50px; height: 50px; stroke: var(--accent-color); margin-bottom: 1.5rem; }
.philosophy-item h3 { font-size: 1.8rem; margin-bottom: 1rem; }
.philosophy-item p { color: var(--text-medium); line-height: 1.8; font-weight: 300; }

/* --- About Section --- */
#about { background-color: var(--bg-medium); position: relative; z-index: 2; margin-top: -7rem; }
#about .container { padding-top: 10rem; padding-bottom: 7rem; } 
.about-content { display: flex; gap: 5rem; align-items: center; }
.about-image { flex: 1; }
.about-text { flex: 1; }
.about-image img { width: 100%; border-radius: 10px; object-fit: cover; filter: grayscale(30%); transition: filter 0.4s ease; }
.about-text h3 { font-size: 2.5rem; margin-bottom: 1.5rem; }
.about-text p { color: var(--text-medium); line-height: 1.9; margin-bottom: 2rem; font-weight: 300; }
.stats { display: flex; gap: 3rem; margin-top: 2.5rem; }
.stat-item { text-align: left; }
.stat-item .number { font-family: var(--heading-font); font-size: 3rem; font-weight: 700; color: var(--accent-color); }
.stat-item .label { font-size: 1rem; color: var(--text-medium); font-weight: 300; }

/* --- Projects Section --- */
#projects { background-color: var(--bg-dark); } 
.project-filters { text-align: center; margin-bottom: 4rem; display: flex; justify-content: center; flex-wrap: wrap; gap: 1rem; }
.filter-btn { background: transparent; border: 1px solid #4B5563; color: var(--text-medium); padding: 0.8rem 1.8rem; border-radius: 30px; cursor: pointer; font-size: 1rem; font-family: var(--body-font); transition: all 0.3s ease; }
.filter-btn.active { background-color: var(--accent-color); border-color: var(--accent-color); color: var(--bg-dark); font-weight: 500; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 2.5rem; }
.project-card-link { text-decoration: none; color: inherit; display: block; transition: opacity 0.5s ease, transform 0.5s ease; border-radius: 10px; }
.project-card { background-color: var(--bg-medium); border-radius: 10px; overflow: hidden; transition: transform 0.4s ease, box-shadow 0.4s ease; border: 1px solid #374151; }
.project-card-link.hidden { opacity: 0; transform: scale(0.95); pointer-events: none; }
.project-card-link.d-none { display: none; }
.project-card .img-wrapper { width: 100%; height: 280px; overflow: hidden; }
.project-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; }
.project-info { padding: 2rem; }
.project-info .category { color: var(--accent-color); font-weight: 500; margin-bottom: 0.7rem; display: block; letter-spacing: 1px; text-transform: uppercase; font-size: 0.8rem; }
.project-info h3 { font-size: 2rem; margin: 0 0 0.5rem 0; font-weight: 600; }
.project-info .location { color: var(--text-medium); font-weight: 300; }
.card-cta { color: var(--accent-color); font-weight: 500; margin-top: 1.5rem; display: inline-block; transition: transform 0.3s ease; }

/* --- Contact Section --- */
#contact { background-color: var(--bg-medium); }
.contact-wrapper { display: flex; gap: 5rem; background-color: var(--bg-dark); padding: 5rem; border-radius: 10px; }
.contact-info, .contact-form { flex: 1; }
.contact-info h3 { font-size: 2.5rem; margin-bottom: 1.5rem; }
.contact-info p { line-height: 1.9; color: var(--text-medium); margin-bottom: 2.5rem; font-weight: 300; }
.info-item { display: flex; align-items: flex-start; gap: 1.5rem; margin-bottom: 2rem; color: var(--text-light); font-weight: 300; }
.info-item svg { width: 24px; height: 24px; stroke: var(--accent-color); flex-shrink: 0; margin-top: 5px; }
.contact-info .info-item a { color: var(--text-medium); text-decoration: none; transition: color 0.3s ease; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { font-size: 0.9rem; color: var(--text-medium); margin-bottom: 0.5rem; display: block; }
.form-group label span.required { color: var(--accent-color); }
.form-group input, .form-group textarea { width: 100%; padding: 1.2rem; background-color: var(--bg-medium); border: 1px solid #374151; border-radius: 5px; color: var(--text-light); font-family: var(--body-font); font-size: 1rem; transition: border-color 0.3s ease; }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--accent-color); }
/* MODIFICATION: Unused phone input styles are now removed */
.submit-btn { width: 100%; border: none; cursor: pointer; }
.loading-spinner { width: 20px; height: 20px; border: 2px solid var(--bg-dark); border-top-color: transparent; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.9); background-color: var(--bg-medium); padding: 3rem 4rem; border-radius: 10px; text-align: center; z-index: 2000; opacity: 0; visibility: hidden; transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); box-shadow: 0 20px 40px rgba(0,0,0,0.5); display: none; }
#success-message { border: 1px solid var(--accent-color); }
#error-message { border: 1px solid #EF4444; }
.modal.show { display: block; opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }
.modal svg { width: 60px; height: 60px; margin: 0 auto 1.5rem auto; }
#success-message svg { stroke: #10B981; }
#error-message svg { stroke: #EF4444; }
.modal h3 { font-family: var(--heading-font); font-size: 2rem; color: var(--text-light); margin-bottom: 1rem; }
.modal p { color: var(--text-medium); margin-bottom: 2rem; }
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(17, 24, 39, 0.8); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 1999; opacity: 0; visibility: hidden; transition: opacity 0.4s ease; display: none; }
.modal-overlay.show { display: block; opacity: 1; visibility: visible; }
.close-btn { background-color: transparent; border: 1px solid var(--accent-color); color: var(--accent-color); }

/* --- Footer --- */
.footer { background-color: #000; padding: 5rem 5% 2rem; border-top: 1px solid #1F2937; }
.footer-container { display: flex; flex-wrap: wrap; gap: 3rem; margin-bottom: 4rem; text-align: left; }
.footer-column { flex: 1; min-width: 220px; }
.footer-column.about { flex: 1.5; }
.footer-column .logo-link { margin-bottom: 1.5rem; justify-content: flex-start; }
.footer-tagline { color: var(--text-medium); font-weight: 300; line-height: 1.7; max-width: 320px; }
.footer-column h4 { font-size: 1.5rem; margin-bottom: 1.5rem; color: var(--text-light); }
.footer-nav { list-style: none; padding: 0; margin: 0; }
.footer-nav li { margin-bottom: 1rem; }
.footer-column a:not(.logo-link) { color: var(--text-medium); text-decoration: none; transition: color 0.3s ease; }
.footer-column .info-item a { color: var(--text-medium); text-decoration: none; transition: color 0.3s ease; }
.footer-bottom { border-top: 1px solid #1F2937; padding-top: 2rem; text-align: center; }
.social-links { margin-bottom: 1.5rem; }
.social-links a { margin: 0 1rem; color: var(--text-medium); transition: color 0.3s ease, transform 0.3s ease; display: inline-block; }
.social-links svg { width: 24px; height: 24px; fill: currentColor; }
.copyright { color: #6B7280; font-weight: 300; font-size: 0.9rem; }

/* --- Floating CTA Button --- */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}
.floating-cta { position: fixed; bottom: 25px; right: 25px; background-color: #25D366; color: white; width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); z-index: 999; transition: transform 0.3s ease; animation: pulse 2.5s infinite cubic-bezier(0.66, 0, 0, 1); }
.floating-cta svg { width: 28px; height: 28px; }


/* --- Back to Top Button --- */
.back-to-top-btn {
    position: fixed;
    bottom: 25px;
    left: 25px;
    background-color: var(--accent-color);
    color: var(--bg-dark);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 998;
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s ease;
    opacity: 0;
    transform: translateY(20px);
    visibility: hidden;
    border: none;
    text-decoration: none;
}
.back-to-top-btn.show {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}
.back-to-top-btn svg {
    width: 24px;
    height: 24px;
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    h2 { font-size: 2.8rem; }
    .hero h1 { font-size: 3.2rem; }
    .about-content { flex-direction: column; gap: 3rem; }
    .contact-wrapper { flex-direction: column; padding: 3rem; gap: 3rem; }
}

@media (max-width: 768px) {
    .hamburger { display: block; z-index: 1002; }
    .hamburger.toggle .line1 { transform: rotate(-45deg) translate(-5px, 6px); }
    .hamburger.toggle .line2 { opacity: 0; }
    .hamburger.toggle .line3 { transform: rotate(45deg) translate(-5px, -6px); }
    .nav-links { position: fixed; top: 0; right: 0; width: 70%; height: 100vh; background-color: var(--bg-medium); flex-direction: column; align-items: center; justify-content: center; padding: 0; box-shadow: -10px 0 30px rgba(0,0,0,0.5); z-index: 1001; transform: translateX(100%); transition: transform 0.4s ease-in-out; }
    .nav-links.active { transform: translateX(0); }
    .nav-links li { margin: 2rem 0; }
    .hero h1 { font-size: 2.5rem; line-height: 1.2; }
    h2 { font-size: 2.2rem; }
    .hero p { font-size: 1.2rem; }
    .container { padding-top: 5rem; padding-bottom: 5rem; }
    .project-grid { grid-template-columns: 1fr; }
    .about-text h3 { font-size: 2rem; }
    #about { margin-top: 0; }
    #about .container { padding-top: 5rem; padding-bottom: 5rem; }
    .stats { flex-wrap: wrap; gap: 2rem; justify-content: center; }
    .stat-item .number { font-size: 2.5rem; }
    .contact-wrapper { padding: 2rem; }
    .modal { width: 90%; padding: 2rem; }
    .footer-column { text-align: center; }
    .footer-column .logo-link { justify-content: center; }
    .footer-tagline { margin-left: auto; margin-right: auto; }
    .footer-column.contact .info-item { justify-content: center; }
}
@media (max-width: 480px) {
    .logo-text { font-size: 20px; }
}
