/* ==========================================================================
   CloudSP Theme Layer
   Loaded after app.css / tablet.css / mobile.css. Refines every shared
   component (cards, buttons, inputs, navbar, footer, banners) while keeping
   the original colour palette. Remove the <link> in app.blade.php to revert.
   ========================================================================== */

:root {
    --deep-color: #00314f;
    --ink-color: #0f2a3d;
    --muted-color: #5a6f80;
    --surface-tint: #f5f8fb;
    --hairline: rgba(255, 255, 255, 0.12);
    --radius-sm: 0.6rem;
    --radius-md: 1rem;
    --radius-lg: 1.25rem;
    --shadow-sm: 0 1px 2px rgba(0, 49, 79, 0.08), 0 2px 6px rgba(0, 49, 79, 0.06);
    --shadow-md: 0 1px 2px rgba(0, 49, 79, 0.08), 0 14px 32px -14px rgba(0, 49, 79, 0.38);
    --shadow-lg: 0 2px 4px rgba(0, 49, 79, 0.08), 0 30px 60px -28px rgba(0, 49, 79, 0.55);
    --shadow-orange: 0 10px 22px -10px rgba(255, 132, 0, 0.75);
    --panel-gradient: linear-gradient(155deg, #0a5d90 0%, var(--primary-color-dark) 42%, #003c62 100%);
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
body {
    color: var(--ink-color);
    font-weight: 400;
    background:
        radial-gradient(1200px 600px at 100% -10%, rgba(33, 135, 199, 0.07), transparent 60%),
        radial-gradient(900px 500px at -10% 40%, rgba(255, 132, 0, 0.05), transparent 60%),
        var(--surface-tint) !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

::selection {
    background: rgba(255, 132, 0, 0.25);
}

h1, h2, h3, h4, h5 {
    letter-spacing: -0.015em;
    line-height: 1.25;
}

p {
    line-height: 1.7;
}

a {
    transition: color 0.2s var(--ease);
}

.text-shadow {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.text-shadow-sm {
    text-shadow: none;
}

/* Section headings: orange title with a short accent bar underneath */
h1.text-orange,
h2.text-orange {
    letter-spacing: -0.025em;
}

h1.text-orange.text-center::after,
h2.text-orange.text-center::after {
    content: "";
    display: block;
    width: 56px;
    height: 4px;
    margin: 0.85rem auto 0;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--orange-color), var(--orange-color-light));
}

/* --------------------------------------------------------------------------
   Navbar
   -------------------------------------------------------------------------- */
.custom-navbar {
    background-color: rgba(255, 255, 255, 0.88);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    box-shadow: 0 1px 0 rgba(0, 49, 79, 0.06), 0 10px 30px -18px rgba(0, 49, 79, 0.35);
    transition: box-shadow 0.3s var(--ease), padding 0.3s var(--ease);
}

.custom-navbar.is-scrolled {
    box-shadow: 0 1px 0 rgba(0, 49, 79, 0.08), 0 14px 36px -16px rgba(0, 49, 79, 0.45);
}

.custom-navbar .nav-link.primary-text {
    position: relative;
    color: var(--primary-color-dark);
    font-weight: 600 !important;
}

.custom-navbar .navbar-nav > .nav-item > .nav-link.primary-text::after,
.custom-navbar .navbar-nav > div > .nav-item:first-child > .nav-link.primary-text::after {
    content: "";
    position: absolute;
    left: 0.5rem;
    right: 0.5rem;
    bottom: 0.2rem;
    height: 2px;
    border-radius: 2px;
    background: var(--orange-color);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s var(--ease);
}

.custom-navbar .nav-link.primary-text:hover {
    color: var(--primary-color);
}

.custom-navbar .nav-link.primary-text:hover::after {
    transform: scaleX(1);
}

.custom-navbar .btn-link.primary-text {
    width: 2.4rem;
    height: 2.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0;
    color: var(--primary-color-dark);
    transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}

.custom-navbar .btn-link.primary-text:hover {
    background: rgba(33, 135, 199, 0.1);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.dropdown-menu {
    border: 1px solid rgba(0, 49, 79, 0.08);
    border-radius: 0.85rem;
    padding: 0.4rem;
    margin-top: 0.6rem !important;
    box-shadow: 0 18px 40px -16px rgba(0, 49, 79, 0.35);
}

/* Invisible bridge over the gap above the menu so the pointer never "leaves" it */
.dropdown-menu::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -0.9rem;
    height: 0.9rem;
}

.dropdown-item {
    border-radius: 0.55rem;
    padding: 0.55rem 0.9rem;
    font-weight: 600 !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: rgba(33, 135, 199, 0.08);
    color: var(--primary-color);
}

/* Mobile offcanvas menu: solid deep-blue panel so white text stays readable */
#mobileOffcanvas {
    background: var(--panel-gradient) !important;
    color: #fff;
    border: 0;
    box-shadow: 20px 0 60px -20px rgba(0, 0, 0, 0.5);
}

#mobileOffcanvas .offcanvas-header {
    border-bottom: 1px solid var(--hairline);
}

#mobileOffcanvas .offcanvas-title {
    color: #fff;
    text-shadow: none;
}

#mobileOffcanvas .btn-close {
    filter: invert(1) grayscale(1) brightness(2);
}

#mobileOffcanvas .list-unstyled > li {
    border-bottom: 1px solid var(--hairline);
}

#mobileOffcanvas .list-unstyled a,
#mobileOffcanvas .nav-link.primary-text {
    color: #fff !important;
    text-shadow: none;
    padding-top: 0.85rem !important;
    padding-bottom: 0.85rem !important;
}

#mobileOffcanvas .list-unstyled a:hover {
    color: var(--orange-color-light) !important;
    padding-left: 0.75rem !important;
}

#mobileOffcanvas .accordion-body {
    background: rgba(0, 0, 0, 0.18);
    border-radius: var(--radius-sm);
}

#mobileOffcanvas .dropdown-item {
    color: #fff;
    border-bottom: 0;
}

/* --------------------------------------------------------------------------
   Surfaces
   -------------------------------------------------------------------------- */
.card-glass {
    position: relative;
    background: var(--panel-gradient);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), var(--shadow-md);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* Cards nested inside cards (detail pages) become quiet tiles */
.card-glass .card-glass {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--hairline);
    box-shadow: none;
    border-radius: 0.75rem;
}

.card-glass .card-glass .card-glass {
    background: rgba(255, 255, 255, 0.05);
}

/* Plan cards on the service pages lift slightly on hover */
.row .col > .card-glass.text-center:has(.btn-glass),
[class*="col-"] > .card-glass.text-center:has(.btn-glass) {
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.row .col > .card-glass.text-center:has(.btn-glass):hover,
[class*="col-"] > .card-glass.text-center:has(.btn-glass):hover {
    transform: translateY(-4px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), var(--shadow-lg);
}

.card-cloud {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

/* Service flip cards */
.card {
    border-radius: var(--radius-md);
}

.front,
.back {
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), var(--shadow-md);
    overflow: hidden;
}

.front {
    background: var(--panel-gradient);
}

.front::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(109, 207, 246, 0.22), transparent 60%);
    pointer-events: none;
}

.front > * {
    position: relative;
}

.front > i {
    width: 5rem;
    height: 5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1.25rem;
    font-size: 2.1rem !important;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    text-shadow: none !important;
}

.back {
    background:
        radial-gradient(circle at 100% 100%, rgba(255, 132, 0, 0.22), transparent 55%),
        linear-gradient(155deg, var(--primary-color-dark), var(--deep-color));
    border-top: 3px solid var(--orange-color);
}

.back p {
    color: rgba(255, 255, 255, 0.88) !important;
}

/* Hero banners */
.home-banner,
.fiber-img,
#adsl-img,
.corporate-img,
.broadband-banner {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-lg);
}

.fiber-img::before,
#adsl-img::before,
.corporate-img::before,
.broadband-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 85% 10%, rgba(255, 132, 0, 0.22), transparent 45%),
        linear-gradient(180deg, rgba(0, 49, 79, 0.15) 0%, rgba(0, 49, 79, 0.6) 100%);
    pointer-events: none;
}

.home-banner > *,
.fiber-img > *,
#adsl-img > *,
.corporate-img > *,
.broadband-banner > * {
    position: relative;
    z-index: 1;
}

/* Taglines sitting on a banner become frosted glass pills */
.fiber-img .card-glass,
#adsl-img .card-glass,
.corporate-img .card-glass,
.broadband-banner .card-glass {
    background: rgba(0, 49, 79, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-weight: 500 !important;
    line-height: 1.6;
}

.header-text {
    letter-spacing: -0.04em;
}

.tagline {
    letter-spacing: -0.01em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.about-image {
    border-radius: var(--radius-md);
}

.map {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

/* Login card keeps its photo, under a blue wash for legibility */
.card-glass.login-card {
    background:
        linear-gradient(155deg, rgba(0, 77, 124, 0.82), rgba(0, 49, 79, 0.92)),
        url('/assets/images/broadband/broadband.png') no-repeat center / cover;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-lg);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn-glass {
    background: linear-gradient(135deg, #ff9a2e 0%, var(--orange-color) 50%, var(--orange-color-dark) 100%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-sm) !important;
    color: #fff !important;
    font-weight: 600;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), var(--shadow-orange);
    backdrop-filter: none;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), filter 0.2s var(--ease);
}

.btn-glass:hover,
.btn-glass:focus-visible {
    background: linear-gradient(135deg, #ff9a2e 0%, var(--orange-color) 50%, var(--orange-color-dark) 100%);
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 14px 26px -10px rgba(255, 132, 0, 0.85);
}

.btn-glass:active {
    transform: translateY(0);
    filter: brightness(0.97);
}

.btn-glass:focus-visible {
    outline: 2px solid var(--primary-color-light);
    outline-offset: 2px;
}

.btn-gradient {
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.input,
.input:focus {
    background: var(--primary-color-dark);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-sm) !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
    backdrop-filter: none;
}

.input {
    min-height: 2.9rem;
    padding: 0.6rem 0.9rem;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}

.input:focus {
    border-color: var(--primary-color-light);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 0 0 3px rgba(109, 207, 246, 0.25);
}

/* Inside a dark card, inputs recess into the panel */
.card-glass .input,
.card-glass .input:focus {
    background: rgba(0, 31, 51, 0.35);
}

.card-glass .input:focus {
    background: rgba(0, 31, 51, 0.45);
}

.input::placeholder,
.inline-input::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

select.input option {
    color: var(--ink-color);
    background: #fff;
}

textarea.input {
    min-height: 6rem;
}

.form-input {
    border: 1px solid #d3dfe9;
    border-radius: var(--radius-sm);
    box-shadow: inset 0 1px 2px rgba(0, 49, 79, 0.06);
}

.form-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(33, 135, 199, 0.18);
}

.form-label {
    font-weight: 500;
    letter-spacing: 0.01em;
}

.form-check-input {
    border: 1.5px solid rgba(255, 255, 255, 0.55);
    background-color: rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.form-check-input:checked {
    background-color: var(--orange-color);
    border-color: var(--orange-color);
}

.form-check-input:focus-visible {
    box-shadow: 0 0 0 3px rgba(255, 132, 0, 0.3);
}

.form-check-label {
    cursor: pointer;
}

input[type="date"].input::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.7;
}

.id-dropzone {
    border-radius: var(--radius-md);
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(0, 31, 51, 0.35);
}

.id-dropzone:hover {
    border-color: var(--primary-color-light);
}

/* --------------------------------------------------------------------------
   Accordion (FAQs)
   -------------------------------------------------------------------------- */
.accordion {
    display: grid;
    gap: 0.75rem;
}

.accordion-item,
.accordion-item:first-child,
.accordion-item:nth-child(2),
.accordion-item:last-child {
    border-radius: var(--radius-md) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), var(--shadow-sm);
    overflow: hidden;
}

.accordion-button {
    padding: 1.15rem 1.35rem;
    text-shadow: none !important;
}

.accordion-button:not(.collapsed) {
    color: var(--orange-color-light) !important;
    box-shadow: inset 0 -1px 0 var(--hairline);
}

.accordion-body {
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.7;
}

/* --------------------------------------------------------------------------
   Tables, alerts, pagination, modals, badges
   -------------------------------------------------------------------------- */
.glass-table {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md) !important;
}

.glass-table th {
    background: rgba(0, 31, 51, 0.6) !important;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.glass-table td {
    background: rgba(0, 49, 79, 0.35) !important;
}

.alert {
    border: 0;
    border-left: 4px solid currentColor;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

[dir="rtl"] .alert,
.alert[dir="rtl"] {
    border-left: 0;
    border-right: 4px solid currentColor;
}

.pagination {
    gap: 0.35rem;
    flex-wrap: wrap;
}

.page-link {
    border: 1px solid #d3dfe9;
    border-radius: 0.5rem !important;
    background: #fff;
    color: var(--primary-color-dark);
    min-width: 2.4rem;
    text-align: center;
    transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.page-link:hover,
.page-link:focus {
    background: rgba(33, 135, 199, 0.08);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: none;
}

.card-glass .page-link:hover,
.card-glass .page-link:focus {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.page-item.disabled .page-link {
    background: transparent;
    opacity: 0.45;
}

.card-glass .page-link {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
}

.card-glass .page-item.active .page-link,
.page-item.active .page-link {
    background: var(--orange-color) !important;
    border-color: var(--orange-color) !important;
    color: #fff !important;
}

.card-glass small.text-muted,
.card-glass .text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

.modal-content {
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-lg);
}

.modal-backdrop.show {
    opacity: 0.6;
    backdrop-filter: blur(2px);
}

.badge.rounded-pill {
    font-weight: 600;
    letter-spacing: 0.02em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* --------------------------------------------------------------------------
   Responsive type scale
   The older tablet/mobile sheets shrink body copy to 0.7rem; restore a
   readable scale while keeping their layout rules.
   -------------------------------------------------------------------------- */
@media screen and (max-width: 1024px) {
    h1 { font-size: 1.85rem !important; }
    h2 { font-size: 1.5rem !important; }
    h3 { font-size: 1.25rem !important; }
    h4 { font-size: 1.1rem !important; }
    h5 { font-size: 1rem !important; }
    h6 { font-size: 0.9rem !important; }
    p { font-size: 0.95rem !important; }
    .header-text { font-size: 5rem !important; }
}

@media screen and (max-width: 800px) {
    h1 { font-size: 1.6rem !important; }
    h2 { font-size: 1.3rem !important; }
    h3 { font-size: 1.15rem !important; }
    h4 { font-size: 1.05rem !important; }
    h5 { font-size: 0.95rem !important; }
    h6 { font-size: 0.85rem !important; }
    p { font-size: 0.92rem !important; }
    .header-text { font-size: 3.25rem !important; }
    .fs-xl { font-size: 2.1rem !important; }

    .card-glass {
        border-radius: 0.85rem;
    }

}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
