/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Titillium Web', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    overflow-x: hidden;
}

/* Material Symbols (Outlined) base: match legacy Material Icons look */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
}

/* Headers inherit Titillium Web from body */

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

/* Header and Navigation */
.header {
    background: rgba(60, 75, 95, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid #4a5f7a;
}

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

.nav-logo a {
    color: #fff;
    text-decoration: none;
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(45deg, #455366, #455366);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: #e0e0e0;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover {
    color: #5a7a9a;
}

.nav-link.active {
    color: #5a7a9a;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(45deg, #5a7a9a, #8ba8c4);
    transition: width 0.3s ease;
}

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

/* Hamburger Menu for Mobile */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #e0e0e0;
    margin: 3px 0;
    transition: 0.3s;
}

/* Sections */
.section {
    padding: 100px 0 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

/* Ensure section containers always take full width, preventing unintended shrink on mobile */
.section > .container {
    width: 100%;
}

.section:nth-child(even) {
    background: linear-gradient(to bottom, #d0d0d0 0%, #e0e0e0 20%, #e0e0e0 80%, #d0d0d0 100%);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(69, 83, 102, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #455366;
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #666;
    animation: fadeInUp 1s ease-out 0.2s both;
}

/* Generic subtitle for non-hero sections (centered) */
.section-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #666;
    text-align: center;
}

/* .cta-button removed (unused on index.html) */

/* Section Titles */
.section-title {
    font-size: 2.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 3rem;
    color: #455366;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(45deg, #3a6ea5, #6db3f2);
    border-radius: 2px;
}

/* About Section */
/* Removed about/profile stats blocks (unused on index.html) */

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

/* Modifier: force single column (used by about2 bottom list) */
.services-grid.one-per-row {
    grid-template-columns: 1fr;
}

/* Center alignment only when there are exactly two service cards
   Do not change card sizes; instead constrain the grid container width and center it */
.services-grid:has(> .service-card:nth-child(2)):not(:has(> .service-card:nth-child(3))) {
    max-width: calc(2 * 400px + 2rem); /* 2 cards at their max width + 1 gap */
    margin-left: auto;
    margin-right: auto;
}

/* Override for About2: let exactly-two-card grids use full container width */
#about2 .services-grid:has(> .service-card:nth-child(2)):not(:has(> .service-card:nth-child(3))) {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

/* Override for About: let exactly-two-card grids use full container width */
#about .services-grid:has(> .service-card:nth-child(2)):not(:has(> .service-card:nth-child(3))) {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

.service-card {
    background: rgba(0, 0, 0, 0.05);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    max-width: 500px;
    width: 100%;
    margin: 0 auto; /* centers the card when there's extra space */
    /* Optional: ensure padding/border stay inside the 500px cap */
    box-sizing: border-box;
}

.service-card:hover {
    transform: translateY(-10px);
    background: rgba(69, 83, 102, 0.1);
    border-color: rgba(69, 83, 102, 0.3);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* .service-icon .material-icons removed (not used) */

/* Material Symbols within service icons: mirror previous appearance */
.service-icon .material-symbols-outlined {
    font-size: 3rem; /* ensure same visual size as before */
    color: #455366;
    transition: all 0.3s ease;
    /* match optical size to display size for proper stroke weight */
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 48;
}

/* hover for .material-icons removed (not used) */

.service-card:hover .service-icon .material-symbols-outlined {
    color: #333;
    transform: scale(1.1);
}

.service-card h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.service-card p {
    color: #666;
    line-height: 1.6;
}

/* Reuse service-card visuals on person-cards without the default background */
.service-card.person-card {
    background: transparent;
}

/* About2 person cards (reuse service-card visuals) */
.person-card .person-photo {
    width: 250px;
    height: 380px;
    border-radius: 15px;
    object-fit: cover;
    border: 3px solid #455366;
    box-shadow: 0 0 25px rgba(69, 83, 102, 0.3);
    display: block;
    margin: 0 auto 1rem auto; /* center image, add space below */
    transition: all 0.3s ease; /* enable smooth hover animation like member-photo */
}

.person-card .member-role {
    margin-top: 0.25rem;
}

/* Hover animation for person image in about cards */
.person-card .person-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 0 35px rgba(69, 83, 102, 0.5);
}

/* Wide variant for person photos (300px width) */
.person-card .person-photo-wide {
    width: 300px;
    height: 380px;
    border-radius: 15px;
    object-fit: cover;
    border: 3px solid #455366;
    box-shadow: 0 0 25px rgba(69, 83, 102, 0.3);
    display: block;
    margin: 0 auto 1rem auto;
    transition: all 0.3s ease;
}

.person-card .person-photo-wide:hover {
    transform: scale(1.05);
    box-shadow: 0 0 35px rgba(69, 83, 102, 0.5);
}

/* Subtle hover for entire person card (override stronger service-card hover) */
.person-card:hover {
    transform: translateY(-2px);
    background: rgba(69, 83, 102, 0.05);
    border-color: rgba(69, 83, 102, 0.1);
}

/* Timeline styles removed (not used on current page) */

/* Portfolio styles removed */

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.contact-info p {
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* contact-details removed (unused) */

.contact-item {
    color: #666;
}

.contact-item strong {
    color: #455366;
}

/* Profile/hexagon styles removed */

/* Team member styles removed */

/* Team group photo section */
.team-photo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.team-photo-image {
    display: block;
    width: calc(100% - 60px); /* 30px margin on left/right fits within container */
    height: auto;
    margin: 30px; /* 30px on all sides for normal view */
    border: 3px solid #455366; /* match member photo border */
    border-radius: 12px;
    box-shadow: 0 0 25px rgba(69, 83, 102, 0.25);
}

.member-role {
    color: #455366;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.member-contact {
    color: #666;
    font-size: 1rem;
    margin: 0; /* avoid blank row between multiple contact lines */
}

/* Optional: if any spacing is ever needed, control it explicitly */
.member-info .member-contact + .member-contact {
    margin-top: 0; /* keep consecutive lines tight */
}

/* Ensure .about-text paragraph margins don't add gaps on contact lines */
.about-text p.member-contact {
    margin: 0;
}

/* contact-profile styles removed (unused) */

.company-details {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.company-details h4 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Contact Form */
.contact-form {
    background: rgba(0, 0, 0, 0.05);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    color: #333;
    font-size: 1rem;
    font-family: 'Titillium Web', sans-serif;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #455366;
    background: rgba(0, 0, 0, 0.15);
}

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

/* .submit-button styles removed (unused) */



/* Privacy Notice Options */
.privacy-notice {
    margin-top: 1rem;
    font-size: 0.85rem;
    line-height: 1.4;
    text-align: center;
}

.privacy-notice.gray-hover {
    color: #555;
}

.privacy-notice.gray-hover:hover {
    color: #999;
}

/* Footer */
.footer {
    background: #f5f5f5;
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid #ddd;
}

.footer p {
    color: #666;
}

/* Contact form: pill-shaped mail button with reveal text */
.circular-button {
    height: 48px;
    width: 56px; /* compact at rest (icon only) */
    border-radius: 9999px; /* pill ends */
    border: 1.5px solid rgba(69,83,102,0.25);
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #455366;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, width 0.22s ease;
    margin-left: 0.5rem;
    vertical-align: middle;
    position: relative;
    overflow: hidden; /* hide text until expanded */
    padding: 0 12px; /* room for text when expanded */
    white-space: nowrap;
}

.circular-button .material-symbols-outlined {
    font-size: 32px;
    line-height: 1;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    display: inline-block;
}

.circular-button:hover {
    background: #455366;
    color: #f5f5f5;
    border-color: rgba(69,83,102,0.4);
    width: 150px; /* expand to reveal text */
}

.circular-button:focus-visible {
    background: #455366;
    color: #f5f5f5;
    border-color: rgba(69,83,102,0.4);
    width: 150px;
}

.circular-button .button-text {
    font-size: 14px;
    letter-spacing: 0.2px;
    opacity: 0;
    max-width: 0; /* collapse so it doesn't affect centering */
    overflow: hidden;
    margin-left: 0; /* no spacing when hidden */
    transition: opacity 0.18s ease, max-width 0.22s ease, margin-left 0.18s ease;
    color: inherit; /* match button color */
    pointer-events: none;
}

.circular-button:hover .button-text,
.circular-button:focus-visible .button-text {
    opacity: 1;
    max-width: 80px; /* allow text to take space */
    margin-left: 8px; /* add spacing only when visible */
}

@media (prefers-reduced-motion: reduce) {
    .circular-button { transition: none; }
    .circular-button:hover,
    .circular-button:focus-visible { width: 150px; }
    .circular-button .button-text { transition: none; }
    .circular-button:hover .button-text,
    .circular-button:focus-visible .button-text { opacity: 1; max-width: 80px; margin-left: 8px; }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(60, 75, 95, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 0.5rem 0; /* tighter vertical padding */
    }

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

    .nav-menu li { margin: 0.25rem 0; } /* reduce gaps between items */

    .hamburger {
        display: flex;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-title { font-size: 2.5rem; }

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

    .section-title {
        font-size: 2rem;
    }

    .about-content { grid-template-columns: 1fr; gap: 2rem; }

    .about-stats {
        flex-direction: row;
        justify-content: space-around;
    }

    .contact-content { grid-template-columns: 1fr; gap: 2rem; }

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

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

    .section { padding: 80px 0 60px; }
}

/* MOBILE VIEW */
@media (max-width: 540px) {
    .container { padding: 0 15px; }
    .hero-title { font-size: 2rem; }

    .about-stats { flex-direction: column; gap: 1rem; }

    .profile-section,
    .contact-profile { flex-direction: column; text-align: center; gap: 1rem; }

    .profile-image,
    .contact-profile-image { width: 80px; height: 80px; }

    .profile-hexagon { margin-left: 0; margin-top: 1rem; }
    .hexagon-image { width: 180px; height: 180px; }

    /* Team section: stack and alternate alignment */
    .team-grid { display: flex; flex-direction: column; gap: 1rem; margin: 2rem 0; }

    .team-member {
        flex-direction: column; /* stack image above text */
        gap: 0.75rem;
        padding: 1rem;
        min-height: auto;
        width: 100%;
        align-items: center;
        justify-content: flex-start;
        text-align: center;
    }

    /* Default ordering: image left, text right */
    .team-member .member-image { order: 0; }
    .team-member .member-info { order: 1; }

    /* Even cards: when stacked, use the same order (image first, text second) and left text */
    .team-grid > .team-member:nth-child(even) {
        align-items: center;
        justify-content: flex-start;
        text-align: center;
    }
    .team-grid > .team-member:nth-child(even) .member-image { order: 0; }
    .team-grid > .team-member:nth-child(even) .member-info { order: 1; }

    /* Ensure text blocks follow container alignment */
    .team-grid .team-member .member-info {
        width: auto;
        text-align: inherit;
    }

    /* Team group photo: full width on narrow screens */
    .team-photo-image {
        width: 100%;
        margin: 0;
    }

    .member-photo { width: 220px; height: 220px; }
    .member-info h3 { font-size: 1.3rem; }
    .member-role { font-size: 1rem; }
   
}
