/* Mano Chandra Dhas Website - Shared Styles */
/* Consistent design system across all pages */

/* Design tokens */
:root {
    /* Matches main's 1000px max-width minus its 2rem side padding, so the
       footer columns line up with the sections above them. */
    --content-width: 936px;
    /* site.js overwrites this with the sticky nav's measured height. */
    --nav-offset: 6rem;
}

/* Reset and Base Styles */
* {
    box-sizing: border-box;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
    /* site.js keeps --nav-offset in step with the sticky nav's real height. */
    scroll-padding-top: var(--nav-offset);
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    background-color: #fafafa;
    color: #2c3e50;
    margin: 0;
    padding: 0;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin: 0;
    line-height: 1.2;
    color: #2c3e50;
}

h1 {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 0.5px;
}

h2 {
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eef2f6;
}

h3 {
    font-size: 1.4rem;
    font-weight: 500;
    margin: 1.5rem 0 1rem;
}

p {
    margin: 0 0 1rem;
    color: #45576a;
}

ul {
    list-style: none;
    padding-left: 0;
}

ul li {
    margin: 0.8rem 0;
    padding: 0.5rem 0;
    color: #45576a;
}

/* Links */
a {
    color: #2376ad;
    text-decoration: none;
    transition: all 0.2s ease;
}

a:visited {
    color: #2376ad;
}

a:hover {
    color: #1d6392;
    text-decoration: underline;
}

a:active {
    color: #2573a7;
}

/* Layout Components */
header {
    background-color: #ffffff;
    padding: 2rem 0 1.5rem;
    text-align: center;
    position: relative;
    z-index: 1001;
    border-bottom: none;
}

/* Navigation */
nav {
    background-color: #ffffff;
    padding: 0.7rem 0;
    border-bottom: 1px solid #eef2f6;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    width: 100%;
}

nav.scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
}

nav a {
    color: #546e7a;
    padding: 0.7rem 1.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 0 0.5rem;
    border-radius: 4px;
    position: relative;
}

nav a:hover {
    background-color: #f5f8fa;
    color: #2c3e50;
}

nav.scrolled a {
    padding: 0.6rem 1.5rem;
}

nav a.active {
    color: #2376ad;
    font-weight: 600;
}

nav a.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 30%;
    right: 30%;
    height: 3px;
    background-color: #2376ad;
    border-radius: 3px 3px 0 0;
    transition: all 0.3s ease;
}

nav.scrolled a.active::after {
    bottom: -2px;
    height: 2px;
}

nav a:hover::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 40%;
    right: 40%;
    height: 2px;
    background-color: #b7c9d3;
    border-radius: 3px 3px 0 0;
}

/* Contact Link - Prominent Styling */
nav a.contact-link {
    background-color: #2376ad;
    color: #ffffff;
    font-weight: 600;
    margin-left: 1rem;
}

nav a.contact-link:hover {
    background-color: #1d6392;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

nav a.contact-link::after {
    display: none;
}

/* When contact link is active (on contact page) */
nav a.contact-link.active {
    background-color: #2c3e50;
    color: #ffffff;
}

main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1.5rem 2rem 2rem;
    contain: content;
}

section {
    background: #ffffff;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.03);
    transition: box-shadow 0.3s ease;
}

/* Sections are prose, not controls: lift the shadow, never the text. */
section:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

/* Contact Grid */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.contact-card {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #eef2f6;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

/* Cards hold different amounts of copy: sit every value on the card floor. */
.contact-card > a,
.contact-card > .highlight-text {
    margin-top: auto;
}

.contact-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.contact-card i {
    font-size: 1.65rem;
    color: #2376ad;
    margin-bottom: 0.85rem;
}

.contact-card h3 {
    color: #2c3e50;
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.contact-card p {
    color: #546e7a;
    margin-bottom: 0.9rem;
    font-size: 0.85rem;
    line-height: 1.5;
}

.contact-card a {
    color: #2376ad;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.5;
    word-break: break-word;
}

.contact-card a:visited {
    color: #2376ad;
}

.contact-card a:hover {
    color: #1d6392;
    text-decoration: underline;
}

/* Call to Action button */
.cta-button {
    display: inline-block;
    background: #2376ad;
    color: white;
    padding: 0.8rem 2rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 0.5rem;
}

.cta-button:hover {
    background: #1d6392;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* Location Info */
.location-info {
    background: #f0f4f8;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border: 1px solid #e3f2fd;
}

.location-info h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 600;
}

.location-info p {
    color: #546e7a;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.location-info address {
    font-style: normal;
    color: #546e7a;
    font-size: 0.95rem;
    line-height: 1.7;
}

.location-info .office-name {
    display: block;
    color: #2c3e50;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.15rem;
}

.office-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 2rem;
    margin-top: 1.1rem;
    padding-top: 1.1rem;
    border-top: 1px solid #d7e3ee;
}

.office-contact a {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: #2c3e50;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.office-contact a:hover,
.office-contact a:focus {
    color: #2376ad;
    text-decoration: underline;
}

.office-contact a i {
    color: #2376ad;
    font-size: 0.9rem;
    width: 1.1rem;
    text-align: center;
}

/* Address + map two-column layout */
.location-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: stretch;
    margin-top: 0.5rem;
}

.office-map {
    min-height: 240px;
}

.office-map iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 240px;
    border: 0;
    border-radius: 8px;
}

/* WhatsApp call-to-chat */
.whatsapp-wrap {
    margin-top: 0.6rem;
}

.contact-card .whatsapp-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 1rem;
    background: #137d3d;
    color: #ffffff;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.contact-card .whatsapp-link:hover,
.contact-card .whatsapp-link:focus {
    background: #106b34;
    text-decoration: none;
    transform: translateY(-1px);
}

.contact-card .whatsapp-link i {
    color: #ffffff;
    font-size: 1rem;
    margin: 0;
}

/* Save contact (vCard) button */
.save-contact {
    text-align: center;
    margin: 1.75rem 0 0.5rem;
}

.save-contact .cta-button i {
    margin-right: 0.5rem;
}

/* Social Connect (contact page) */
.social-connect {
    text-align: center;
    background: #f0f4f8;
    padding: 1.75rem 1.5rem 1.25rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border: 1px solid #e3f2fd;
}

.social-connect h3 {
    color: #2c3e50;
    margin-bottom: 0.35rem;
    font-weight: 600;
}

.social-connect p {
    color: #546e7a;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.social-connect .social-links {
    margin: 1.25rem 0 0.25rem;
    padding: 0;
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 2.5rem 0;
    padding: 1rem 0;
    flex-wrap: wrap;
}

.social-links a {
    color: #546e7a;
    font-size: 1.2rem;
    transition: all 0.2s ease;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.2rem;
    height: 3.2rem;
    background-color: #f5f8fa;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.social-links a:hover, .social-links a:focus {
    color: #ffffff;
    background-color: #2376ad;
    transform: translateY(-3px);
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.social-links a i {
    position: relative;
    z-index: 2;
    font-size: 1.4rem;
}

.social-links a:visited {
    color: #546e7a;
}

.social-links a:hover:visited, .social-links a:focus:visited {
    color: #ffffff;
}

/* Social platform specific colors */
.social-links a.linkedin:hover {
    background-color: #0077b5;
}

.social-links a.instagram:hover {
    background-color: #e1306c;
}

.social-links a.facebook:hover {
    background-color: #1877f2;
}

.social-links a.twitter:hover {
    background-color: #1da1f2;
}

/* Portrait Image Styles */
.intro-container {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.intro-text {
    flex: 1;
    min-width: 0;
}

.intro-image {
    flex: 0 1 300px;
    max-width: 100%;
    margin: 0;
    text-align: center;
}

.intro-image img {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 300px;
    max-width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.intro-image img:hover {
    transform: scale(1.02);
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #2376ad;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(20px);
    z-index: 990;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

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

.back-to-top:hover {
    background-color: #1d6392;
    transform: translateY(-3px);
}

/* Quotes/Testimonials */
.quote {
    padding: 1.5rem;
    border-left: 4px solid #2376ad;
    margin: 1.5rem 0;
    background: #f8fafc;
    border-radius: 0 8px 8px 0;
}

.quote p {
    margin: 0 0 0.5rem 0;
    font-style: italic;
    color: #2c3e50;
}

.quote-author {
    font-weight: 500;
    color: #2376ad;
    font-style: normal;
}

.quote-title {
    font-size: 0.9rem;
    color: #546e7a;
    margin-top: 0.25rem;
}

/* Reset the testimonial's attribution footer so it does not inherit the
   dark page-footer styling from the global `footer` element selector. */
.quote-footer {
    background: none;
    color: inherit;
    text-align: left;
    padding: 0;
}

.quote-footer p {
    color: inherit;
    margin: 0;
}

/* Connect Section */
.websites {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
    list-style: none;
    padding: 0;
}

.website-card {
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 8px;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.website-card:hover {
    transform: translateY(-5px);
}

.website-card h3 {
    margin: 0 0 0.4rem 0;
    color: #2c3e50;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.website-card p {
    color: #546e7a;
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0 0 0.6rem;
}

/* Descriptions differ in length: keep the links on a shared line. */
.website-card a {
    display: inline-block;
    margin-top: auto;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.5;
    padding: 0.2rem 0;
    color: #2376ad;
    text-decoration: none;
}

.website-card a:visited {
    color: #2376ad;
}

.website-card a:hover, .website-card a:focus {
    color: #1d6392;
    text-decoration: underline;
}

/* Utility Classes */
.view-more {
    text-align: center;
    margin: 2rem 0;
}

.view-more a {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: #2376ad;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.view-more a:hover, .view-more a:focus {
    background: #1d6392;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
    text-decoration: none;
}

.view-more a:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.subsection {
    margin-bottom: 2rem;
}

.subsection h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 600;
}

.highlight-text {
    color: #2376ad;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.6;
}

.last-updated {
    color: #66798a;
}

.link-context {
    color: #d3d3d3;
}

/* Footer */
footer {
    background: #2c3e50;
    color: #ffffff;
    text-align: center;
    padding: 2.5rem 2rem 1.5rem;
}

footer p {
    color: #ffffff;
    margin: 0.5rem 0;
}

footer a {
    color: #ffffff;
    text-decoration: underline;
    transition: color 0.2s ease;
}

footer a:hover {
    color: #e8f4f8;
    text-decoration: underline;
}

footer a:visited {
    color: #f0f8ff;
}

footer .link-context {
    color: #d3d3d3;
}

footer .last-updated {
    color: #b0c4de;
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Neutralize global <nav> styles leaking into the footer nav column */
footer nav.footer-col {
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
    position: static;
    display: block;
    width: auto;
    z-index: auto;
}

footer .footer-col ul a {
    padding: 0;
    margin: 0;
    border-radius: 0;
}

footer .footer-col ul a:hover,
footer .footer-col ul a:focus {
    background: transparent;
}

/* Footer columns */
.footer-columns {
    max-width: var(--content-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.3fr;
    gap: 2.5rem;
    text-align: left;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.footer-col h4 {
    color: #ffffff;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-identity h4 {
    font-size: 1.1rem;
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 0.5rem;
}

.footer-identity p {
    color: #b0c4de;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin: 0 0 0.55rem;
    padding: 0;
}

.footer-col ul a {
    color: #d7e3ee;
    text-decoration: none;
    font-size: 0.92rem;
}

.footer-col ul a:hover,
.footer-col ul a:focus {
    color: #ffffff;
    text-decoration: underline;
}

.footer-connect .social-links {
    justify-content: flex-start;
    gap: 0.7rem;
    margin: 0 0 1.1rem;
    padding: 0;
}

.footer-connect .social-links a {
    width: 2.6rem;
    height: 2.6rem;
    font-size: 1rem;
}

.footer-connect .social-links a i {
    font-size: 1.1rem;
}

.footer-contact a {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 0.5rem;
    color: #d7e3ee;
    text-decoration: none;
    font-size: 0.92rem;
    margin-bottom: 0.45rem;
}

.footer-contact a:hover,
.footer-contact a:focus {
    color: #ffffff;
    text-decoration: underline;
}

.footer-contact a i {
    width: 1rem;
    text-align: center;
    color: #8fb4d4;
}

.footer-bottom {
    max-width: var(--content-width);
    margin: 0 auto;
    text-align: center;
    padding-top: 1.25rem;
}

.footer-bottom p {
    margin: 0.35rem 0;
}

/* Accessibility improvements */
.skip-to-content {
    position: absolute;
    top: 0;
    transform: translateY(-110%);
    left: 0;
    background: #2376ad;
    color: white;
    padding: 8px;
    z-index: 10000;
    transition: top 0.3s ease;
}

.skip-to-content:focus {
    top: 0;
    transform: translateY(0);
    outline: none;
}

:focus {
    outline: 2px solid #2376ad;
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

/* Overview: compact orientation above the full biography */
.overview-lead {
    font-size: 1.2rem;
}

.overview-byline {
    margin-bottom: 1.5rem;
    color: #6b7f92;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

.overview-services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin: 0 0 1.5rem;
}

.overview-services li {
    margin: 0;
    padding: 1rem;
    background: #f5f8fa;
    border-radius: 6px;
}

.overview-services strong,
.overview-services span {
    display: block;
}

.overview-services span {
    margin-top: 0.5rem;
}

/* The call to action follows the offer, flush with the prose above it. */
.overview-actions {
    margin: 0;
}

.overview-actions .cta-button {
    margin: 0;
}

/* In-page jump links: pills that size to their label and wrap. */
.page-links {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e1e8ee;
}

.page-links p {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.page-links ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0;
}

.page-links li {
    margin: 0;
    padding: 0;
}

.page-links a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0.6rem 1rem;
    border: 1px solid #d6e1e9;
    border-radius: 999px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.page-links a:hover,
.page-links a:focus-visible {
    background: #f0f4f8;
    border-color: #2376ad;
    text-decoration: underline;
}

/* Contact page primary actions */
.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.contact-actions .cta-button {
    margin: 0;
}

a.cta-button,
a.cta-button:visited {
    color: #ffffff;
}

.whatsapp-button,
.whatsapp-button:visited {
    background: #137d3d;
}

.whatsapp-button:hover {
    background: #106b34;
}

.back-to-top {
    visibility: hidden;
    pointer-events: none;
}

.back-to-top.visible {
    visibility: visible;
    pointer-events: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    nav a {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        margin: 0 0.2rem;
    }

    nav.scrolled a {
        padding: 0.6rem 0.8rem;
    }

    nav a.contact-link {
        margin-left: 0.2rem;
    }

    header h1 {
        font-size: 2rem;
    }

    main {
        padding: 1rem;
    }

    section {
        padding: 1.5rem;
    }

    .contact-grid,
    .websites {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .location-grid {
        grid-template-columns: 1fr;
    }

    .footer-columns {
        grid-template-columns: 1fr;
        gap: 1.75rem;
        text-align: center;
    }

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

    .footer-contact a {
        width: auto;
        justify-content: center;
    }

    .intro-container {
        flex-direction: column-reverse;
    }

    .intro-text {
        width: 100%;
    }

    .intro-image {
        flex-basis: auto;
        margin: 0 auto 1.5rem;
    }
}

@media (max-width: 480px) {
    nav a {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }

    header h1 {
        font-size: 1.8rem;
    }

    /* Full-width buttons only where the screen is too narrow to sit beside text. */
    .cta-button {
        display: block;
        margin: 0.5rem 0;
    }

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

    .contact-actions a {
        text-align: center;
    }
}

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

    *, *::before, *::after {
        transition: none !important;
        animation: none !important;
    }

    .intro-image img:hover {
        transform: none;
    }
}
