/* =========================================================
   Branches Page - Rakhshinda Maroon Theme
========================================================= */

.rgs-branches-hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    display: flex;
    align-items: center;
    padding: 110px 0 95px;
    background: var(--deep-maroon);
}

.rgs-branches-hero-bg {
    position: absolute;
    inset: 0;
}

.rgs-branches-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.34;
    transform: scale(1.08);
    animation: rgsBranchesHeroMove 18s ease-in-out infinite alternate;
}

.rgs-branches-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 22%, rgba(217, 119, 6, 0.28), transparent 30%),
        linear-gradient(90deg, rgba(74, 15, 25, 0.97), rgba(122, 30, 44, 0.84), rgba(74, 15, 25, 0.58));
}

.rgs-branches-hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.25;
    background-image:
        linear-gradient(rgba(255, 247, 237, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 247, 237, 0.055) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.rgs-branches-hero .container {
    position: relative;
    z-index: 3;
}

.rgs-branches-hero h1 {
    max-width: 850px;
    color: var(--cream);
    font-size: clamp(2.7rem, 6vw, 6.1rem);
    line-height: 0.92;
    letter-spacing: -0.075em;
    font-weight: 930;
    margin: 0;
}

.rgs-branches-hero h1 span {
    display: block;
    margin-top: 10px;
    color: var(--soft-gold);
    font-size: 0.76em;
    line-height: 1.04;
    letter-spacing: -0.052em;
}

.rgs-branches-hero p {
    max-width: 680px;
    color: rgba(255, 247, 237, 0.77);
    font-size: 1.05rem;
    line-height: 1.82;
    margin: 26px 0 0;
}

.rgs-branches-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 34px;
}

.rgs-branches-hero-card {
    position: relative;
    overflow: hidden;
    padding: 32px;
    border-radius: 36px;
    background: rgba(255, 247, 237, 0.12);
    border: 1px solid rgba(255, 247, 237, 0.18);
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(18px);
    color: var(--cream);
}

.rgs-branches-hero-card::after {
    content: "";
    position: absolute;
    width: 230px;
    height: 230px;
    right: -90px;
    bottom: -110px;
    border-radius: 50%;
    background: rgba(252, 211, 77, 0.14);
}

.rgs-branches-hero-card-icon {
    width: 74px;
    height: 74px;
    border-radius: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--soft-gold);
    color: var(--deep-maroon);
    font-size: 2rem;
    margin-bottom: 26px;
}

.rgs-branches-hero-card span {
    display: block;
    color: var(--soft-gold);
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.78rem;
}

.rgs-branches-hero-card strong {
    display: block;
    color: var(--cream);
    font-size: 3.2rem;
    line-height: 0.95;
    letter-spacing: -0.07em;
    font-weight: 950;
    margin-top: 8px;
}

.rgs-branches-hero-card p {
    margin-top: 18px;
    color: rgba(255, 247, 237, 0.72);
}

.rgs-branch-dot-list {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 22px;
}

.rgs-branch-dot-list span {
    width: fit-content;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 247, 237, 0.12);
    border: 1px solid rgba(255, 247, 237, 0.16);
    color: var(--cream);
    font-size: 0.78rem;
    font-weight: 850;
}

/* Branch List */
.rgs-branches-list-section {
    padding: 110px 0;
    background:
        radial-gradient(circle at 12% 18%, rgba(122, 30, 44, 0.08), transparent 32%),
        var(--cream);
}

.rgs-branch-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.rgs-branch-card {
    position: relative;
    overflow: hidden;
    border-radius: 38px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(122, 30, 44, 0.14);
    box-shadow: 0 24px 70px rgba(74, 15, 25, 0.1);
    transition: all 0.35s ease;
}

.rgs-branch-card:hover {
    transform: translateY(-10px);
    border-color: rgba(122, 30, 44, 0.34);
    box-shadow: 0 36px 96px rgba(74, 15, 25, 0.16);
}

.rgs-branch-image {
    position: relative;
    height: 270px;
    overflow: hidden;
}

.rgs-branch-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.06);
    transition: transform 0.75s ease;
}

.rgs-branch-card:hover .rgs-branch-image img {
    transform: scale(1.16);
}

.rgs-branch-image-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgba(74, 15, 25, 0.86), transparent 60%),
        radial-gradient(circle at 80% 20%, rgba(252, 211, 77, 0.2), transparent 34%);
}

.rgs-branch-number {
    position: absolute;
    left: 22px;
    top: 20px;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 247, 237, 0.75);
    font-size: 3.2rem;
    line-height: 1;
    font-weight: 950;
    letter-spacing: -0.08em;
}

.rgs-branch-label {
    position: absolute;
    right: 20px;
    top: 20px;
    padding: 8px 13px;
    border-radius: 999px;
    color: var(--deep-maroon);
    background: var(--soft-gold);
    font-size: 0.76rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.rgs-branch-content {
    padding: 28px;
}

.rgs-branch-content h3 {
    color: var(--deep-maroon);
    font-size: 1.65rem;
    font-weight: 950;
    letter-spacing: -0.045em;
    margin-bottom: 12px;
}

.rgs-branch-school {
    display: block;
    margin: -4px 0 12px;
    color: var(--primary-maroon);
    font-size: 0.9rem;
    font-weight: 900;
    line-height: 1.45;
}

.rgs-branch-content p {
    color: rgba(31, 41, 55, 0.68);
    line-height: 1.72;
    margin-bottom: 22px;
}

.rgs-branch-info {
    display: grid;
    gap: 10px;
    margin-bottom: 24px;
}

.rgs-branch-info div {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 13px 14px;
    border-radius: 18px;
    background: rgba(255, 247, 237, 0.8);
    border: 1px solid rgba(122, 30, 44, 0.1);
}

.rgs-branch-info i {
    color: var(--primary-maroon);
    margin-top: 2px;
}

.rgs-branch-info span {
    color: rgba(31, 41, 55, 0.72);
    font-size: 0.9rem;
    font-weight: 750;
    line-height: 1.5;
}

.rgs-branch-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.rgs-map-btn,
.rgs-branch-contact-btn {
    min-height: 46px;
    padding: 0 17px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 900;
    transition: all 0.3s ease;
}

.rgs-map-btn {
    color: var(--cream);
    background: linear-gradient(135deg, var(--primary-maroon), var(--deep-maroon));
    box-shadow: 0 14px 34px rgba(74, 15, 25, 0.2);
}

.rgs-map-btn:hover {
    color: var(--cream);
    transform: translateY(-3px);
    box-shadow: 0 22px 48px rgba(74, 15, 25, 0.28);
}

.rgs-branch-contact-btn {
    color: var(--deep-maroon);
    background: rgba(122, 30, 44, 0.08);
    border: 1px solid rgba(122, 30, 44, 0.16);
}

.rgs-branch-contact-btn:hover {
    color: var(--deep-maroon);
    transform: translateY(-3px);
    background: rgba(122, 30, 44, 0.12);
}

.rgs-map-btn.disabled,
.rgs-map-panel-body a.disabled {
    pointer-events: none;
    opacity: 0.55;
    filter: grayscale(0.3);
}

/* Map Panel */
.rgs-branch-map-section {
    padding: 110px 0;
    background: #ffffff;
}

.rgs-map-feature-list {
    display: grid;
    gap: 13px;
    margin-top: 30px;
}

.rgs-map-feature-list div {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 16px;
    border-radius: 20px;
    background: var(--cream);
    border: 1px solid rgba(122, 30, 44, 0.12);
}

.rgs-map-feature-list i {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--soft-gold);
    background: var(--primary-maroon);
}

.rgs-map-feature-list span {
    color: var(--deep-maroon);
    font-weight: 850;
}

.rgs-map-panel {
    overflow: hidden;
    padding: 18px;
    border-radius: 36px;
    background:
        radial-gradient(circle at 80% 20%, rgba(252, 211, 77, 0.16), transparent 32%),
        linear-gradient(135deg, var(--primary-maroon), var(--deep-maroon));
    box-shadow: 0 36px 96px rgba(74, 15, 25, 0.24);
}

.rgs-map-panel-top {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 2px 16px;
}

.rgs-map-panel-top span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--soft-gold);
}

.rgs-map-panel-top span:nth-child(2) {
    background: var(--gold);
}

.rgs-map-panel-top span:nth-child(3) {
    background: var(--cream);
}

.rgs-map-panel-top strong {
    margin-left: auto;
    color: var(--cream);
    font-size: 0.88rem;
    font-weight: 900;
}

.rgs-map-panel-body {
    display: grid;
    gap: 12px;
}

.rgs-map-panel-body a {
    display: grid;
    grid-template-columns: 170px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 17px;
    border-radius: 22px;
    background: rgba(255, 247, 237, 0.1);
    border: 1px solid rgba(255, 247, 237, 0.14);
    text-decoration: none;
    transition: all 0.3s ease;
}

.rgs-map-panel-body a:hover {
    transform: translateX(6px);
    background: rgba(255, 247, 237, 0.15);
    border-color: rgba(252, 211, 77, 0.34);
}

.rgs-map-panel-body a > div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rgs-map-panel-body i {
    color: var(--soft-gold);
}

.rgs-map-panel-body strong {
    color: var(--cream);
    font-weight: 950;
}

.rgs-map-panel-body span {
    color: rgba(255, 247, 237, 0.72);
    font-size: 0.9rem;
    font-weight: 700;
}

.rgs-map-panel-body em {
    color: var(--soft-gold);
    font-style: normal;
    font-weight: 900;
    white-space: nowrap;
}

/* Values */
.rgs-branches-values-section {
    padding: 110px 0;
    background:
        radial-gradient(circle at 12% 18%, rgba(122, 30, 44, 0.08), transparent 32%),
        var(--cream);
}

.rgs-branches-values-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.rgs-branch-value-card {
    min-height: 245px;
    padding: 28px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(122, 30, 44, 0.14);
    box-shadow: 0 20px 55px rgba(74, 15, 25, 0.08);
    transition: all 0.34s ease;
}

.rgs-branch-value-card:hover {
    transform: translateY(-9px);
    border-color: rgba(122, 30, 44, 0.34);
    box-shadow: 0 32px 82px rgba(74, 15, 25, 0.14);
}

.rgs-branch-value-card i {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--soft-gold);
    background: linear-gradient(135deg, var(--primary-maroon), var(--deep-maroon));
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.rgs-branch-value-card h3 {
    color: var(--deep-maroon);
    font-size: 1.2rem;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.rgs-branch-value-card p {
    color: rgba(31, 41, 55, 0.68);
    line-height: 1.7;
    margin: 10px 0 0;
}

/* CTA */
.rgs-branches-cta-section {
    padding: 100px 0;
    background: #ffffff;
}

.rgs-branches-cta-box {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 36px;
    padding: 52px;
    border-radius: 44px;
    background:
        radial-gradient(circle at 12% 24%, rgba(252, 211, 77, 0.18), transparent 32%),
        linear-gradient(135deg, var(--primary-maroon), var(--deep-maroon));
    box-shadow: 0 38px 100px rgba(74, 15, 25, 0.26);
}

.rgs-branches-cta-box::after {
    content: "BRANCHES";
    position: absolute;
    right: -18px;
    bottom: -20px;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 247, 237, 0.12);
    font-size: clamp(4.7rem, 13vw, 12rem);
    font-weight: 950;
    letter-spacing: -0.1em;
    pointer-events: none;
}

.rgs-branches-cta-box h2 {
    position: relative;
    z-index: 2;
    color: var(--cream);
    font-size: clamp(2rem, 4.8vw, 4.2rem);
    line-height: 0.96;
    letter-spacing: -0.07em;
    font-weight: 950;
    margin: 0 0 18px;
}

.rgs-branches-cta-box p {
    position: relative;
    z-index: 2;
    max-width: 700px;
    color: rgba(255, 247, 237, 0.74);
    line-height: 1.8;
    margin: 0;
}

.rgs-branches-cta-actions {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 1199px) {
    .rgs-branch-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .rgs-branch-card:last-child {
        grid-column: 1 / -1;
        justify-self: center;
        width: min(100%, calc((100% - 24px) / 2));
    }

    .rgs-branches-values-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .rgs-map-panel-body a {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991px) {
    .rgs-branches-hero {
        min-height: auto;
        padding: 85px 0 75px;
    }

    .rgs-branch-grid {
        grid-template-columns: 1fr;
    }

    .rgs-branch-card:last-child {
        grid-column: auto;
        justify-self: stretch;
        width: 100%;
    }

    .rgs-branches-cta-box {
        flex-direction: column;
        align-items: flex-start;
    }

    .rgs-branches-cta-actions {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .rgs-branches-hero h1 {
        font-size: clamp(2.45rem, 13vw, 4rem);
        line-height: 0.98;
    }

    .rgs-branches-hero h1 span {
        font-size: 0.82em;
    }

    .rgs-branches-hero-actions {
        flex-direction: column;
    }

    .rgs-branches-hero-actions .rgs-btn {
        width: 100%;
    }

    .rgs-branches-hero-card strong {
        font-size: 2.5rem;
    }

    .rgs-branch-image {
        height: 230px;
    }

    .rgs-branch-actions {
        flex-direction: column;
    }

    .rgs-map-btn,
    .rgs-branch-contact-btn {
        width: 100%;
    }

    .rgs-branches-values-grid {
        grid-template-columns: 1fr;
    }

    .rgs-branches-cta-box {
        padding: 32px;
        border-radius: 32px;
    }

    .rgs-branches-cta-actions {
        flex-direction: column;
    }

    .rgs-branches-cta-actions .rgs-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .rgs-branches-list-section,
    .rgs-branch-map-section,
    .rgs-branches-values-section,
    .rgs-branches-cta-section {
        padding: 70px 0;
    }

    .rgs-branch-content {
        padding: 22px;
    }

    .rgs-branch-number {
        font-size: 2.6rem;
    }
}

@keyframes rgsBranchesHeroMove {
    from {
        transform: scale(1.08) translateX(0);
    }

    to {
        transform: scale(1.16) translateX(-18px);
    }
}
