:root {
    --saffron: #ff7722;
    --saffron-dark: #e35f12;
    --india-green: #138808;
    --navy: #0b2545;
    --soft: #f5f7fa;
}

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #1f2937;
    background-color: var(--soft);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(255, 119, 34, .5);
}

/* ---------- Header ---------- */
.topbar {
    background: var(--navy);
    color: #dbe4f0;
    font-size: .8rem;
    padding: .35rem 0;
}

.brand-logo {
    height: 56px;
    width: auto;
    display: block;
}

@media (max-width: 575.98px) {
    .brand-logo {
        height: 44px;
    }
}

.brand-mark {
    background: linear-gradient(135deg, var(--saffron), var(--india-green));
    color: #fff;
    font-weight: 700;
    letter-spacing: 1px;
    padding: .35rem .55rem;
    border-radius: .4rem;
}

/* ---------- Indian e-Visa form (adapted from the Gravity Forms styling) ---------- */
.evisa-step {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--navy, #0B2545);
    border-bottom: 2px solid var(--saffron);
    padding-bottom: .35rem;
    margin-bottom: 1rem;
}

.evisa-section {
    background: #6fa7d4;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: .75rem;
}

.evisa-note {
    background: #f7fbff;
    border: 1px solid #c9e0f2;
    border-radius: 8px;
    padding: 12px 14px;
}

.evisa-form input,
.evisa-form select,
.evisa-form textarea {
    border-color: #b8d7f1;
}

.brand-text {
    font-weight: 600;
    color: var(--navy);
    font-size: 1rem;
    line-height: 1.1;
}

.navbar .nav-link {
    color: var(--navy);
    font-weight: 500;
}

.navbar .nav-link:hover {
    color: var(--saffron-dark);
}

/* Dropdown items pointing at a page that isn't built yet (Coming Soon) */
.dropdown-item-soon {
    color: #dc3545;
}

.dropdown-item-soon:hover,
.dropdown-item-soon:focus {
    color: #fff;
    background-color: #dc3545;
}

/* ---------- Buttons ---------- */
.btn-saffron {
    background: var(--saffron);
    border-color: var(--saffron);
    color: #fff;
    font-weight: 600;
}

.btn-saffron:hover,
.btn-saffron:focus {
    background: var(--saffron-dark);
    border-color: var(--saffron-dark);
    color: #fff;
}

.btn-green {
    background: var(--india-green);
    border-color: var(--india-green);
    color: #fff;
    font-weight: 600;
}

.btn-green:hover {
    background: #0f6d06;
    color: #fff;
}

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(135deg, var(--navy) 0%, #163a6b 100%);
    color: #fff;
    padding: 4rem 0 5rem;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 6px;
    background: linear-gradient(90deg, var(--saffron) 0 33%, #fff 33% 66%, var(--india-green) 66% 100%);
}

.hero h1 {
    font-weight: 700;
    font-size: clamp(1.8rem, 4vw, 3rem);
}

.hero-image {
    max-width: 100%;
    height: auto;
    max-height: 480px;
    border-radius: 1rem;
    box-shadow: 0 14px 32px rgba(0, 0, 0, .35);
}

@media (max-width: 991.98px) {
    .hero-image {
        max-height: 340px;
        margin-top: 1rem;
    }
}

.hero .lead {
    color: #cdd9ec;
    max-width: 38rem;
}

/* ---------- Cards / sections ---------- */
.feature-card {
    background: linear-gradient(180deg, #ffffff 0%, #f2f6fb 100%);
    border: 1px solid #dfe6ef;
    border-radius: .75rem;
    padding: 1.5rem;
    height: 100%;
    position: relative;
    overflow: hidden;
    /* Resting elevation so cards read as raised surfaces, not flat outlines. */
    box-shadow: 0 8px 20px rgba(11, 37, 69, .10), 0 2px 6px rgba(11, 37, 69, .06);
    transition: transform .15s ease, box-shadow .15s ease;
}

/* Saffron-to-green accent strip along the card's top edge. */
.feature-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--saffron), var(--india-green));
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 1.25rem 2.25rem rgba(11, 37, 69, .18), 0 4px 10px rgba(11, 37, 69, .08);
}

/* ---------- Hero image cube (right of the hero copy) ---------- */
/* A real 6-face cube — one photo per face — adapted from Temani Afif's "3D Cube (random)
   slider" (https://codepen.io/t_afif/pen/vYrpjKX). Pure CSS, no JS: all six images are
   stacked in the same grid cell, each rotated onto its own cube face, then the whole cube
   is tumbled by a single keyframe animation. The tumble alternates between different
   rotation axes each step (not just spinning around one axis), which is what makes it read
   as "random" rather than a simple predictable spin. */
.hero-cube-outer {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 2rem 0;
}

.hero-cube {
    --s: clamp(200px, 30vw, 380px);
    --p: perspective(calc(2.5 * var(--s)));
    display: grid;
    transform-style: preserve-3d;
    /* A plain ease-in-out (vs. the original's overshoot bezier) glides through each turn
       instead of snapping past it and settling back — reads as smooth, not bouncy. */
    animation: hero-cube-tumble 11s infinite ease-in-out;
}

.hero-cube img {
    grid-area: 1 / 1;
    width: var(--s);
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: .5rem;
    filter: drop-shadow(0 1.25rem 2rem rgba(0, 0, 0, .35));
    transform: var(--face-rotate, ) translateZ(calc(var(--s) / 2));
}

/* Six faces of a cube: front (default), top, right, back, bottom, left. */
.hero-cube img:nth-child(2) { --face-rotate: rotateX(-90deg); }
.hero-cube img:nth-child(3) { --face-rotate: rotateY(90deg); }
.hero-cube img:nth-child(4) { --face-rotate: rotateX(180deg) rotate(90deg); }
.hero-cube img:nth-child(5) { --face-rotate: rotateX(90deg); }
.hero-cube img:nth-child(6) { --face-rotate: rotateY(-90deg); }

@keyframes hero-cube-tumble {
    0%, 3%    { transform: var(--p) rotate3d(0, 0, 0, 0deg); }
    14%, 19%  { transform: var(--p) rotate3d(-1, 1, 0, 180deg); }
    31%, 36%  { transform: var(--p) rotate3d(0, -1, 0, 90deg); }
    47%, 52%  { transform: var(--p) rotate3d(1, 0, 0, 90deg); }
    64%, 69%  { transform: var(--p) rotate3d(1, 0, 0, -90deg); }
    81%, 86%  { transform: var(--p) rotate3d(0, 1, 0, 90deg); }
    97%, 100% { transform: var(--p) rotate3d(0, 0, 0, 0deg); }
}

/* Alternative hero slider style (admin-selectable, see HomeHeroSetting): a circular photo
   drum adapted from Temani Afif's "Circular image Slider with N images"
   (https://codepen.io/t_afif/pen/ZERBJBq) for N=6 — the SCSS math/loops from the source are
   pre-computed here into plain CSS since this project has no SCSS build step. */
.circle-gallery {
    --s: clamp(260px, 32vw, 420px);
    --d: 12s;

    display: grid;
    width: var(--s);
    aspect-ratio: 1;
    overflow: hidden;
    padding: calc(var(--s) / 20);
    border-radius: 50%;
    position: relative;
    clip-path: circle(49.5%);
}

.circle-gallery::after {
    content: "";
    position: absolute;
    inset: 0;
    padding: inherit;
    border-radius: inherit;
    background: repeating-conic-gradient(var(--saffron) 0 30deg, #fff 30deg 60deg, var(--india-green) 60deg 90deg);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.circle-gallery > img {
    grid-area: 1 / 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    /* Pivot far below center — rotating every image around this shared point sweeps
       each one through the circle's "front" slot in turn, like cabins on a Ferris wheel. */
    transform-origin: 50% 150%;
}

.circle-gallery::after,
.circle-gallery > img {
    animation: circle-tumble var(--d) infinite cubic-bezier(.5, -.2, .5, 1.2);
}

/* Each image shares the identical animation but starts partway through via a negative
   delay, staggering all 6 evenly around the circle from the first frame. */
.circle-gallery > img:nth-child(2) { animation-delay: -2s; }
.circle-gallery > img:nth-child(3) { animation-delay: -4s; }
.circle-gallery > img:nth-child(4) { animation-delay: -6s; }
.circle-gallery > img:nth-child(5) { animation-delay: -8s; }
.circle-gallery > img:nth-child(6) { animation-delay: -10s; }

@keyframes circle-tumble {
    0%, 3%           { transform: rotate(0); }
    14.667%, 19.667% { transform: rotate(-60deg); }
    31.333%, 36.333% { transform: rotate(-120deg); }
    48%, 53%         { transform: rotate(-180deg); }
    64.667%, 69.667% { transform: rotate(-240deg); }
    81.333%, 86.333% { transform: rotate(-300deg); }
    98%, 100%        { transform: rotate(-360deg); }
}

/* Full-bleed image header on a service card (extends to the card's top edges).
   Fixed height keeps the text on neighbouring cards horizontally aligned. */
.svc-card-img {
    display: block;
    width: calc(100% + 3rem);
    margin: -1.5rem -1.5rem 1rem -1.5rem;
    border-radius: .75rem .75rem 0 0;
    object-fit: cover;
    height: 260px;
}

/* Reserved blank image area for cards whose picture hasn't been supplied yet — keeps text
   aligned with neighbouring image-topped cards. */
.svc-card-placeholder {
    display: block;
    width: calc(100% + 3rem);
    margin: -1.5rem -1.5rem 1rem -1.5rem;
    border-radius: .75rem .75rem 0 0;
    height: 260px;
    background: linear-gradient(180deg, #f6f8fb, #eef1f6);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    background: rgba(255, 119, 34, .12);
    color: var(--saffron-dark);
    margin-bottom: .75rem;
}

.section-title {
    font-weight: 700;
    color: var(--navy);
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--india-green);
    color: #fff;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.card-surface {
    background: linear-gradient(180deg, #ffffff 0%, #f2f6fb 100%);
    border: 1px solid #dfe6ef;
    border-radius: .75rem;
    box-shadow: 0 8px 20px rgba(11, 37, 69, .10), 0 2px 6px rgba(11, 37, 69, .06);
}

/* ---------- Status badges ---------- */
.badge-status {
    font-weight: 600;
    padding: .4em .7em;
    color: #fff;
}

.status-Submitted { background: #6c757d; }                   /* gray */
.status-UnderReview { background: #ffc107; color: #212529; } /* yellow */
.status-DocumentsVerified { background: #fd7e14; }           /* orange */
.status-Approved { background: #8bc34a; color: #212529; }    /* light green */
.status-SentToConsulateOffice { background: #0f5132; }       /* dark green */
.status-Rejected { background: #dc3545; }                    /* red */
.status-ReadyForCollection { background: #0d6efd; }          /* blue */
.status-Completed { background: #e83e8c; }                   /* pink */

/* ---------- Footer ---------- */
.site-footer {
    background: var(--navy);
    color: #cdd9ec;
}

.site-footer .footer-logo {
    display: block;
    width: 120px;
    height: auto;
    border-radius: 8px;
    background: #fff;
    padding: 4px;
}

.site-footer .footer-qr {
    width: 110px;
    height: auto;
    border-radius: 8px;
}

.site-footer .social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fff;
    color: var(--navy) !important;
    transition: background-color .15s ease, color .15s ease, transform .15s ease;
}

.site-footer .social-icon:hover {
    background: var(--saffron);
    color: #fff !important;
    text-decoration: none;
    transform: translateY(-2px);
}

/* Everything after a visible "do not submit" notice is blocked out (evisa-conditional.js). */
.evisa-blocked {
    display: none !important;
}

.site-footer .footer-disclaimer {
    font-size: .72rem;
    line-height: 1.5;
    color: #9fb2cf;
    text-align: center;
    max-width: 60rem;
    margin: 0 auto .75rem;
}

.site-footer a {
    color: #cdd9ec;
    text-decoration: none;
}

.site-footer a:hover {
    color: #fff;
    text-decoration: underline;
}

.site-footer h6 {
    color: #fff;
    letter-spacing: .5px;
}

/* ---------- Contact page ---------- */
.contact-info {
    background: linear-gradient(160deg, var(--navy) 0%, #163a6b 100%);
    color: #eaf1fb;
    border: none !important;
    position: relative;
    overflow: hidden;
}

.contact-info::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 5px;
    background: linear-gradient(90deg, var(--saffron) 0 33%, #fff 33% 66%, var(--india-green) 66% 100%);
}

.contact-info .section-title {
    color: #fff;
}

.contact-info h6 {
    color: var(--saffron);
    letter-spacing: .5px;
}

.contact-info p {
    color: #cdd9ec;
}

.contact-phone {
    margin: 0;
    padding: 0;
    list-style: none;
}

.contact-phone li {
    margin-bottom: .5rem;
}

.contact-phone a {
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .55rem;
}

.contact-phone a:hover {
    color: var(--saffron);
}

.contact-phone svg,
.contact-address svg {
    flex: 0 0 auto;
    color: var(--saffron);
}

.contact-address {
    display: flex;
    gap: .55rem;
    align-items: flex-start;
}

/* Right-hand form card: saffron top accent for contrast against the navy panel. */
.contact-form-card {
    border-top: 4px solid var(--saffron);
}

.contact-services {
    background: var(--soft);
    border: 1px solid #e6e9ef;
    border-radius: .6rem;
    padding: .85rem 1rem;
    max-height: 15rem;
    overflow-y: auto;
}

.contact-services .form-check-input:checked {
    background-color: var(--india-green);
    border-color: var(--india-green);
}

.contact-captcha {
    background: rgba(255, 119, 34, .08);
    border: 1px dashed var(--saffron);
    border-radius: .5rem;
    padding: .85rem 1rem;
}

/* ---------- Consulate page ---------- */
.consulate-banner {
    width: 100%;
    height: auto;
    border-radius: .75rem;
    box-shadow: 0 10px 24px rgba(11, 37, 69, .18);
    border-bottom: 4px solid var(--saffron);
}

.consulate-photo {
    max-width: 100%;
    height: auto;
    border-radius: .75rem;
    box-shadow: 0 10px 24px rgba(11, 37, 69, .18);
}

/* Portrait photo on the PCC landing page — cap the height so it doesn't dwarf the text column. */
.pcc-photo {
    max-height: 420px;
    width: auto;
}

/* Transparent-background cutout on the About page — no frame, just a soft shadow. */
.about-cutout {
    max-width: 100%;
    height: auto;
    max-height: 460px;
    filter: drop-shadow(0 12px 24px rgba(11, 37, 69, .25));
}

/* Home "About Us" section photo. */
.about-photo {
    max-width: 100%;
    height: auto;
    max-height: 520px;
    border-radius: .75rem;
    box-shadow: 0 10px 24px rgba(11, 37, 69, .18);
    border-bottom: 4px solid var(--saffron);
}

.consulate-stat {
    background: #fff;
    border: 1px solid #e6e9ef;
    border-left: 4px solid var(--saffron);
    border-radius: .6rem;
    padding: .9rem 1.1rem;
    height: 100%;
}

.consulate-stat-number {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.2;
}

.consulate-service {
    background: rgba(19, 136, 8, .09);
    color: var(--india-green);
    border: 1px solid rgba(19, 136, 8, .25);
    border-radius: 2rem;
    padding: .35rem .9rem;
    font-weight: 600;
    font-size: .9rem;
}

/* Full-bleed page-top hero: background photo with a dark gradient so white title text stays readable. */
.consulate-hero {
    position: relative;
    min-height: 320px;
    display: flex;
    align-items: flex-end;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    margin-bottom: 2.5rem;
}

.consulate-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11, 37, 69, .35) 0%, rgba(11, 37, 69, .55) 40%, rgba(11, 37, 69, .92) 100%);
}

.consulate-hero .container {
    position: relative;
    z-index: 1;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.consulate-hero h1 {
    color: #fff;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}

.consulate-hero .breadcrumb-trail {
    color: rgba(255, 255, 255, .8);
    font-weight: 600;
    font-size: .9rem;
}

.consulate-hero .breadcrumb-trail a {
    color: #fff;
    text-decoration: none;
}

.consulate-hero .breadcrumb-trail .current {
    color: var(--saffron);
}

/* Mid-page "content hero" card: kicker + heading over a photo, boxed and rounded (vs. the full-bleed page hero above). */
.consulate-content-hero {
    position: relative;
    min-height: 260px;
    border-radius: 1rem;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    background-size: cover;
    background-position: center;
    box-shadow: 0 10px 24px rgba(11, 37, 69, .18);
}

.consulate-content-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11, 37, 69, .05) 0%, rgba(11, 37, 69, .2) 40%, rgba(11, 37, 69, .88) 100%);
}

.consulate-content-hero .inner {
    position: relative;
    z-index: 1;
    padding: 1.75rem;
    color: #fff;
}

.consulate-content-hero .kicker {
    display: inline-block;
    background: rgba(255, 255, 255, .15);
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 2rem;
    padding: .3rem .9rem;
    font-size: .8rem;
    font-weight: 600;
    margin-bottom: .6rem;
}

.consulate-content-hero h2 {
    color: #fff;
    font-weight: 700;
    margin: 0;
}

/* ---------- Forms ---------- */
.form-label {
    font-weight: 600;
    color: var(--navy);
}

.required-mark {
    color: #dc3545;
}

/* ---------- Sticky navigation ---------- */
/* When the sticky navbar's collapse menu is open on small screens, cap it to the
   viewport so every item stays reachable by scrolling inside the menu. */
.navbar.sticky-top .navbar-collapse.show,
.navbar.sticky-top .navbar-collapse.collapsing {
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

/* ---------- Active navigation state ---------- */
/* Shows the visitor which section of the site they are currently in. */
.navbar .nav-link.active {
    color: var(--saffron-dark);
    font-weight: 600;
    position: relative;
}

.navbar .nav-link.active::after {
    content: "";
    position: absolute;
    left: .75rem;
    right: .75rem;
    bottom: .15rem;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--saffron), var(--india-green));
}

/* Collapsed (mobile) menu: use a left bar instead of an underline. */
@media (max-width: 1199.98px) {
    .navbar .nav-link.active::after {
        left: 0;
        right: auto;
        top: .3rem;
        bottom: .3rem;
        width: 3px;
        height: auto;
    }
}

.dropdown-menu .dropdown-item.active,
.dropdown-menu .dropdown-item:active {
    background-color: var(--saffron);
    color: #fff;
}
