
    :root {
      --purple-950: #25104d;
      --purple-900: #321261;
      --purple-800: #451782;
      --purple-700: #5b21b6;
      --purple-600: #6d28d9;
      --purple-500: #7c3aed;
      --purple-100: #ede9fe;
      --purple-50: #f7f5ff;
      --gold: #d6a84f;
      --text: #29263a;
      --muted: #77738a;
      --bg: #f7f7fb;
    }

    * { box-sizing: border-box; }

    body {
      margin: 0;
      background: var(--bg);
      color: var(--text);
      font-family: "Sarabun", sans-serif;
    }

    h1, h2, h3, h4, h5, .navbar-brand {
        font-family: "Sarabun", sans-serif;
    }

    .topbar {
      background: var(--purple-950);
      color: rgba(255,255,255,.9);
      font-size: .85rem;
    }

    .navbar {
      background: rgba(255,255,255,.96);
      box-shadow: 0 3px 20px rgba(37,16,77,.08);
      position: sticky;
      top: 0;
      z-index: 1000;
    }

    .brand-logo {
      width: 52px;
      height: 52px;
      border-radius: 15px;
      background: linear-gradient(135deg, var(--purple-700), var(--purple-500));
      color: #fff;
      display: grid;
      place-items: center;
      box-shadow: 0 8px 20px rgba(91,33,182,.25);
      flex: 0 0 auto;
    }

    .brand-title {
      line-height: 1.1;
      color: var(--purple-950);
    }

    .brand-title strong {
      display: block;
      font-size: 1.15rem;
      font-weight: 600;
    }

    .brand-title small {
      color: var(--muted);
      font-size: .76rem;
    }

    .nav-link {
      color: #514c61 !important;
      font-weight: 500;
      padding: .7rem .85rem !important;
    }

    .nav-link:hover, .nav-link.active {
      color: var(--purple-700) !important;
    }

    .btn-login {
      background: var(--purple-700);
      color: #fff;
      border: 0;
      border-radius: 12px;
      padding: .65rem 1rem;
      font-weight: 500;
    }

    .btn-login:hover {
      background: var(--purple-800);
      color: #fff;
    }

    .hero {
      position: relative;
      overflow: hidden;
      background:
        radial-gradient(circle at 85% 20%, rgba(255,255,255,.18), transparent 28%),
        radial-gradient(circle at 10% 100%, rgba(214,168,79,.15), transparent 25%),
        linear-gradient(135deg, #321261 0%, #5b21b6 55%, #7c3aed 100%);
      color: #fff;
      padding: 70px 0 105px;
    }

    .hero::after {
      content: "";
      position: absolute;
      left: -5%;
      right: -5%;
      bottom: -55px;
      height: 100px;
      background: var(--bg);
      border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    }

    .hero-content {
      position: relative;
      z-index: 2;
    }

    .eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: .4rem .8rem;
      border: 1px solid rgba(255,255,255,.25);
      border-radius: 999px;
      background: rgba(255,255,255,.1);
      font-size: .85rem;
      margin-bottom: 18px;
    }

    .hero h1 {
      font-size: clamp(2.1rem, 5vw, 3.7rem);
      font-weight: 600;
      line-height: 1.15;
      margin-bottom: 14px;
    }

    .hero p {
      color: rgba(255,255,255,.82);
      max-width: 650px;
      font-size: 1.03rem;
    }

    .search-box {
      margin-top: 28px;
      max-width: 760px;
      background: #fff;
      padding: 7px;
      border-radius: 17px;
      box-shadow: 0 18px 45px rgba(24,7,53,.28);
      display: flex;
      align-items: center;
    }

    .search-box i {
      color: var(--purple-500);
      margin: 0 12px;
      font-size: 1.1rem;
    }

    .search-box input {
      border: 0;
      outline: 0;
      flex: 1;
      min-width: 0;
      padding: 13px 4px;
      font-family: inherit;
    }

    .search-box button {
      border: 0;
      background: var(--purple-700);
      color: #fff;
      border-radius: 12px;
      padding: 12px 22px;
      font-family: inherit;
      font-weight: 500;
    }

    .section {
      padding: 35px 0 25px;
    }

    .section-heading {
      display: flex;
      justify-content: space-between;
      align-items: end;
      margin-bottom: 20px;
      gap: 15px;
    }

    .section-heading h2 {
      color: var(--purple-950);
      font-size: 1.7rem;
      margin: 0;
    }

    .section-heading p {
      margin: 4px 0 0;
      color: var(--muted);
      font-size: .9rem;
    }

    .view-all {
      color: var(--purple-700);
      text-decoration: none;
      font-size: .9rem;
      white-space: nowrap;
    }

    .service-card {
      position: relative;
      height: 100%;
      background: #fff;
      border: 1px solid #eceaf3;
      border-radius: 18px;
      padding: 22px;
      transition: .25s ease;
      overflow: hidden;
    }

    .service-card::after {
      content: "";
      position: absolute;
      width: 90px;
      height: 90px;
      right: -35px;
      bottom: -35px;
      border-radius: 50%;
      background: var(--purple-50);
    }

    .service-card:hover {
      transform: translateY(-5px);
      border-color: #d9cdf4;
      box-shadow: 0 15px 35px rgba(69,23,130,.11);
    }

    .service-icon {
      width: 58px;
      height: 58px;
      border-radius: 16px;
      display: grid;
      place-items: center;
      background: var(--purple-100);
      color: var(--purple-700);
      font-size: 1.35rem;
      margin-bottom: 17px;
    }

    .service-card h5 {
      margin-bottom: 7px;
      color: #30274a;
      font-weight: 500;
    }

    .service-card p {
      color: var(--muted);
      font-size: .84rem;
      line-height: 1.65;
      margin-bottom: 15px;
    }

    .service-link {
      color: var(--purple-700);
      text-decoration: none;
      font-size: .86rem;
      font-weight: 600;
    }

    .popular-card {
      background: linear-gradient(145deg, #fff, #fbfaff);
      border: 1px solid #e9e4f6;
      border-radius: 17px;
      padding: 18px;
      display: flex;
      align-items: center;
      gap: 14px;
      height: 100%;
      transition: .2s;
    }

    .popular-card:hover {
      box-shadow: 0 12px 28px rgba(69,23,130,.1);
      transform: translateY(-3px);
    }

    .popular-icon {
      width: 48px;
      height: 48px;
      border-radius: 13px;
      background: var(--purple-100);
      color: var(--purple-700);
      display: grid;
      place-items: center;
      flex: 0 0 auto;
    }

    .popular-card strong {
      display: block;
      font-family: "Sarabun", sans-serif;
      font-weight: 500;
      color: #35284f;
    }

    .popular-card small {
      color: var(--muted);
    }

    .category {
      background: #fff;
      border-radius: 20px;
      padding: 25px;
      border: 1px solid #eceaf3;
      height: 100%;
    }

    .category-title {
      display: flex;
      align-items: center;
      gap: 12px;
      color: var(--purple-900);
      margin-bottom: 17px;
    }

    .category-title .cat-icon {
      width: 42px;
      height: 42px;
      display: grid;
      place-items: center;
      border-radius: 12px;
      background: var(--purple-100);
      color: var(--purple-700);
    }

    .category ul {
      list-style: none;
      padding: 0;
      margin: 0;
    }

    .category li + li {
      border-top: 1px solid #f0eef5;
    }

    .category a {
      display: flex;
      justify-content: space-between;
      padding: 11px 0;
      text-decoration: none;
      color: #5d586b;
      font-size: .9rem;
    }

    .category a:hover {
      color: var(--purple-700);
    }

    .news-card {
      background: #fff;
      border: 1px solid #eceaf3;
      border-radius: 18px;
      padding: 20px;
      height: 100%;
    }

    .news-date {
      display: inline-block;
      background: var(--purple-100);
      color: var(--purple-700);
      border-radius: 8px;
      padding: 4px 9px;
      font-size: .72rem;
      margin-bottom: 11px;
    }

    .news-card h5 {
      font-size: 1rem;
      line-height: 1.5;
      color: #34284e;
    }

    .news-card p {
      color: var(--muted);
      font-size: .82rem;
      line-height: 1.6;
    }

    .stats {
      margin-top: 25px;
      padding: 22px;
      border-radius: 20px;
      background: rgba(255,255,255,.1);
      border: 1px solid rgba(255,255,255,.16);
      backdrop-filter: blur(10px);
      max-width: 700px;
    }

    .stat {
      text-align: center;
      border-right: 1px solid rgba(255,255,255,.15);
    }

    .stat:last-child { border-right: 0; }

    .stat strong {
      display: block;
      font-family: "Sarabun", sans-serif;
      font-size: 1.5rem;
    }

    .stat small {
      color: rgba(255,255,255,.7);
    }

    footer {
      margin-top: 45px;
      background: #21103f;
      color: rgba(255,255,255,.7);
      padding: 42px 0 22px;
    }

    footer h5 {
      color: #fff;
      margin-bottom: 13px;
    }

    footer p, footer li, footer a {
      font-size: .85rem;
      line-height: 1.8;
    }

    footer a {
      color: rgba(255,255,255,.7);
      text-decoration: none;
    }

    footer a:hover { color: #fff; }

    .footer-bottom {
      border-top: 1px solid rgba(255,255,255,.1);
      margin-top: 25px;
      padding-top: 18px;
      font-size: .76rem;
    }

    @media (max-width: 991.98px) {
      .hero { padding-top: 55px; }
      .navbar-nav { padding-top: 10px; }
      .btn-login { margin-top: 7px; }
    }

    @media (max-width: 575.98px) {
      .topbar { display: none; }

      .brand-logo {
        width: 45px;
        height: 45px;
        border-radius: 13px;
      }

      .brand-title strong { font-size: 1rem; }
      .brand-title small { font-size: .68rem; }

      .hero {
        padding: 42px 0 90px;
      }

      .hero h1 {
        font-size: 2.15rem;
      }

      .hero p {
        font-size: .9rem;
      }

      .search-box {
        border-radius: 14px;
        flex-wrap: wrap;
        padding: 6px;
      }

      .search-box input {
        width: calc(100% - 55px);
      }

      .search-box button {
        width: 100%;
        margin-top: 5px;
      }

      .stats {
        padding: 16px 8px;
      }

      .stat strong { font-size: 1.2rem; }
      .stat small { font-size: .7rem; }

      .section {
        padding-top: 25px;
      }

      .section-heading h2 {
        font-size: 1.4rem;
      }

      .section-heading {
        align-items: start;
      }

      .service-card {
        padding: 18px;
      }

      .service-icon {
        width: 50px;
        height: 50px;
        border-radius: 14px;
      }
    }

    /* =========================
   CCTV ICON HERO
========================= */

.hero-camera {
    position: relative;
    width: 280px;
    height: 280px;

    display: flex;
    align-items: center;
    justify-content: center;
}

/* วงกลมพื้นหลัง */
.camera-circle {
    position: absolute;
    border-radius: 50%;
}

.camera-circle-1 {
    width: 320px;
    height: 320px;

    background: rgba(255, 255, 255, 0.07);

    animation: cameraPulse 3s infinite;
}

.camera-circle-2 {
    width: 260px;
    height: 260px;

    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* กล่องไอคอน */
.camera-icon {
    position: relative;
    z-index: 2;

    width: 220px;
    height: 220px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 40px;

    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.20);

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);

    transform: rotate(-5deg);

    animation: cameraFloat 4s ease-in-out infinite;
}

/* ตัวกล้อง */
.camera-icon i {
    font-size: 160px;
    color: #ffffff;

    filter: drop-shadow(
        0 8px 15px rgba(0, 0, 0, 0.15)
    );
}


/* ลอยขึ้นลง */
@keyframes cameraFloat {

    0%, 100% {
        transform: translateY(0) rotate(-5deg);
    }

    50% {
        transform: translateY(-12px) rotate(-5deg);
    }

}


/* วงกลม Pulse */
@keyframes cameraPulse {

    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.08);
        opacity: .6;
    }

}

/* =========================
   HERO IMAGE
========================= */

.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 330px;
}

/* รูป */
.hero-image img {
    position: relative;
    z-index: 2;

    width: 600px;
    max-width: none;
    height: auto;

    object-fit: contain;

    filter: drop-shadow(
        0 20px 25px rgba(0, 0, 0, 0.18)
    );

    animation: heroFloat 4s ease-in-out infinite;
}


/* Animation ลอยเบา ๆ */
@keyframes heroFloat {

    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }

}

/* =====================================================
   CCTV INFORMATION SECTION
===================================================== */

.cctv-info-section {
    padding: 30px 0;
    background: #f8f9fc;
}


/* =========================
   LEFT CARD
========================= */

.info-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 38px;
    border: 1px solid #eee8f5;

    box-shadow:
        0 10px 35px rgba(52, 25, 80, 0.06);
}


.info-card-header {
    display: flex;
    align-items: center;
    gap: 16px;

    margin-bottom: 25px;
}


.info-title-icon {
    width: 58px;
    height: 58px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 16px;

    background: linear-gradient(
        135deg,
        #54258b,
        #8246df
    );

    color: #ffffff;
    font-size: 23px;

    box-shadow:
        0 8px 20px rgba(101, 51, 170, 0.20);
}


.info-label {
    display: block;

    color: #7b48c5;
    font-size: 13px;
    font-weight: 600;

    margin-bottom: 3px;
}


.info-card-header h3 {
    margin: 0;

    color: #30233c;
    font-size: 23px;
    font-weight: 700;
}


.info-description {
    color: #6e6875;
    line-height: 1.9;

    padding-bottom: 25px;
    margin-bottom: 8px;

    border-bottom: 1px solid #eeeaf2;
}


/* =========================
   DETAIL LIST
========================= */

.detail-item {
    display: flex;
    gap: 17px;

    padding: 20px 0;

    border-bottom: 1px solid #f0edf3;
}


.detail-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}


.detail-icon {
    width: 46px;
    height: 46px;

    flex: 0 0 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 13px;

    background: #f2eafd;
    color: #6d38b1;

    font-size: 18px;
}


.detail-item h6 {
    margin: 2px 0 5px;

    color: #382844;

    font-size: 16px;
    font-weight: 700;
}


.detail-item p {
    margin: 0;

    color: #77717d;
    font-size: 14px;
    line-height: 1.7;
}


/* =====================================================
   RIGHT DOCUMENT CARD
===================================================== */

.document-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 38px;

    border: 1px solid #eee8f5;

    box-shadow:
        0 10px 35px rgba(52, 25, 80, 0.06);
}


/* =========================
   HEADER
========================= */

.document-header {
    display: flex;
    align-items: center;
    gap: 16px;

    margin-bottom: 25px;
}


/* ไอคอนหัวข้อ */
.document-header-icon {
    width: 58px;
    height: 58px;

    flex: 0 0 58px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 16px;

    background: linear-gradient(
        135deg,
        #54258b,
        #8246df
    );

    color: #ffffff;
    font-size: 23px;

    box-shadow:
        0 8px 20px rgba(101, 51, 170, 0.20);
}


/* คำว่า เอกสารประกอบ */
.document-header span {
    display: block;

    color: #7b48c5;
    font-size: 13px;
    font-weight: 600;

    margin-bottom: 3px;
}


/* หัวข้อ เอกสารและหลักฐาน */
.document-header h3 {
    margin: 0;

    color: #30233c;

    font-size: 23px;
    font-weight: 700;
}


/* =========================
   INTRO
========================= */

.document-intro {
    color: #6e6875;

    font-size: 14px;
    line-height: 1.9;

    padding-bottom: 25px;
    margin-bottom: 8px;

    border-bottom: 1px solid #eeeaf2;
}


/* =====================================================
   DOCUMENT LIST
===================================================== */

.document-list {
    border-top: none;
}


/* แต่ละรายการ */
.document-item {
    display: flex;
    align-items: flex-start;

    gap: 17px;

    padding: 20px 0;

    border-bottom: 1px solid #f0edf3;
}


.document-item:last-child {
    border-bottom: none;
}


/* =========================
   NUMBER
========================= */

.document-number {
    width: 46px;
    height: 46px;

    flex: 0 0 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 13px;

    background: #f2eafd;
    color: #6d38b1;

    font-size: 12px;
    font-weight: 700;
}


/* =========================
   DOCUMENT TEXT
========================= */

.document-item h6 {
    margin: 2px 0 5px;

    color: #382844;

    font-size: 16px;
    font-weight: 700;
}


.document-item p {
    margin: 0;

    color: #77717d;

    font-size: 14px;
    line-height: 1.7;
}


/* =====================================================
   NOTE / คำแนะนำ
===================================================== */

.document-note {
    display: flex;
    align-items: flex-start;

    gap: 13px;

    margin-top: 25px;
    padding: 17px;

    border-radius: 15px;

    background: #faf7ff;

    border: 1px solid #eee5f8;
}


/* ไอคอนหลอดไฟ */
.note-icon {
    width: 40px;
    height: 40px;

    flex: 0 0 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;

    background: #f2eafd;
    color: #6d38b1;

    font-size: 17px;
}


.document-note strong {
    display: block;

    color: #382844;

    font-size: 14px;
    font-weight: 700;
}


.document-note p {
    margin: 3px 0 0;

    color: #77717d;

    font-size: 13px;
    line-height: 1.6;
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 991px) {

    .cctv-info-section {
        padding: 55px 0;
    }

}


@media (max-width: 576px) {

    .info-card,
    .document-card {
        padding: 25px 20px;
        border-radius: 18px;
    }


    .info-card-header h3,
    .document-header h3 {
        font-size: 19px;
    }


    .info-title-icon,
    .document-header-icon {
        width: 50px;
        height: 50px;

        flex: 0 0 50px;
    }


    .document-number {
        width: 42px;
        height: 42px;

        flex: 0 0 42px;
    }

}

/* =====================================================
   LINE QR CODE
===================================================== */

.document-content {
    flex: 1;
    min-width: 0;
}


.color-line {
    color: #06c755;
    font-weight: 700;
    text-decoration: none;
}

.color-line:hover {
    color: #05a847;
    text-decoration: underline;
}


/* กล่อง QR */
.line-qr-box {
    display: flex;
    align-items: center;
    gap: 18px;

    margin-top: 16px;
    padding: 15px;

    max-width: 390px;

    background: #fafafa;
    border: 1px solid #ececec;
    border-radius: 16px;
}


/* Link ครอบ QR */
.line-qr-link {
    display: block;
    flex-shrink: 0;
}


/* รูป QR */
.line-qr-image {
    display: block;

    width: 110px;
    height: 110px;

    object-fit: contain;

    padding: 5px;

    background: #ffffff;

    border: 1px solid #eeeeee;
    border-radius: 10px;

    transition: all 0.25s ease;
}


/* Hover */
.line-qr-link:hover .line-qr-image {
    transform: scale(1.04);

    box-shadow:
        0 7px 20px rgba(0, 0, 0, 0.10);
}


/* ข้อมูลด้านข้าง */
.line-qr-info {
    flex: 1;
}


.line-qr-title {
    color: #333333;

    font-size: 14px;
    font-weight: 700;

    margin-bottom: 4px;
}


.line-qr-title i {
    color: #06c755;

    font-size: 21px;

    margin-right: 5px;
    vertical-align: middle;
}


.line-qr-id {
    color: #06c755;

    font-size: 16px;
    font-weight: 700;

    margin-bottom: 4px;
}


.line-qr-info small {
    color: #888888;

    font-size: 12px;
}


/* =========================
   MOBILE
========================= */

@media (max-width: 576px) {

    .line-qr-box {
        flex-direction: column;
        align-items: center;

        text-align: center;
    }

    .line-qr-image {
        width: 130px;
        height: 130px;
    }

}

@media (max-width: 575.98px) {

    .brand-title strong {
        font-size: 0;
    }

    .brand-title strong::after {
        content: "ระบบบริการออนไลน์\A องค์การบริหารส่วนจังหวัดพระนครศรีอยุธยา";

        white-space: pre-line;

        font-size: 0.85rem;
        font-weight: 600;
        line-height: 1.35;

        color: var(--purple-950);
    }

}

/* =====================================================
   BUTTONS
===================================================== */

.cctv-buttons {
    display: flex;
    flex-wrap: wrap;

    gap: 12px;

    margin-bottom: 35px;
}


/* Primary */

.btn-cctv-primary {
    min-height: 52px;

    display: inline-flex;
    align-items: center;

    gap: 10px;

    padding: 7px 18px 7px 8px;

    border-radius: 14px;

    background: #ffffff;

    color: #4d1d91;

    text-decoration: none;

    font-size: 16px;
    font-weight: 600;

    transition: 0.25s ease;
}


.btn-cctv-primary span {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: #eee6ff;

    color: #6527c4;
}


.btn-cctv-primary .arrow {
    margin-left: 5px;

    transition: 0.25s ease;
}


.btn-cctv-primary:hover {
    color: #4d1d91;

    transform: translateY(-3px);

    box-shadow:
        0 12px 30px rgba(20, 4, 50, 0.20);
}


.btn-cctv-primary:hover .arrow {
    transform: translateX(4px);
}


/* Outline */

.btn-cctv-outline {
    min-height: 52px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 9px;
    padding: 10px 20px;

    border-radius: 14px;
    border:
        1px solid rgba(255, 255, 255, 0.45);

    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.05);
    transition: 0.25s ease;
}


.btn-cctv-outline:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    border-color: #ffffff;
    transform: translateY(-3px);
}



/* =====================================================
   FEATURES
===================================================== */

.cctv-features {
    display: flex;
    padding-top: 23px;
}


.cctv-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 22px;
    margin-right: 22px;
    border-right:
        1px solid rgba(255, 255, 255, 0.13);
}


.cctv-feature:last-child {
    border-right: none;

    padding-right: 0;
    margin-right: 0;
}


.feature-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 16px;
}


.cctv-feature strong {
    display: block;
    color: #ffd76a;
    font-size: 16px;
    font-weight: 600;
}


.cctv-feature small {
    display: block;
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 16px;
}


/* =====================================================
   RIGHT VISUAL
===================================================== */

.cctv-visual {
    position: relative;

    min-height: 480px;

    display: flex;
    align-items: center;
    justify-content: center;
}


/* =====================================================
   MAIN IMAGE
===================================================== */

.cctv-main-image {
    position: relative;
    z-index: 3;
    width: 570px;
    max-width: 110%;
    height: 530px;
    object-fit: contain;

    filter:
        drop-shadow(
            0 25px 35px rgba(20, 4, 50, 0.25)
        );
    animation:
        cctvImageFloat 5s ease-in-out infinite;
}


@keyframes cctvImageFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }

}


/* =====================================================
   FLOATING CARDS
===================================================== */

.cctv-floating-card {
    position: absolute;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 15px;
    border-radius: 15px;
    background:
        rgba(255, 255, 255, 0.13);
    border:
        1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow:
        0 12px 30px rgba(20, 5, 50, 0.15);
}


.floating-icon {
    width: 39px;
    height: 39px;
    flex: 0 0 39px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}


.cctv-floating-card small {
    display: block;
    color: rgba(255, 255, 255, 0.65);
    font-size: 16px;
}


.cctv-floating-card strong {
    display: block;
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
}


.location-card {
    top: 55px;
    right: 15px;
}


.secure-card {
    right: 300px;
    bottom: 32px;
}



/* =====================================================
   TABLET
===================================================== */

@media (max-width: 991.98px) {

    .featured-cctv {
        padding: 30px 0 35px;
    }


    .cctv-content {
        padding:
            45px 40px 20px;
    }


    .cctv-content h2 {
        font-size: 2.5rem;
    }


    .cctv-description {
        max-width: 100%;
    }


    .cctv-visual {
        min-height: 390px;
    }


    .cctv-main-image {
        width: 500px;
        max-width: 85%;

        height: 350px;
    }


    .location-card {
        top: 30px;
        right: 12%;
    }


    .secure-card {
        right: 13%;
        bottom: 30px;
    }

}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 767.98px) {

    .featured-cctv {
        padding:
            25px 0 30px;
    }


    .featured-cctv-card {
        border-radius: 22px;
    }


    .cctv-content {
        padding:
            30px 22px 10px;
    }


    .cctv-badge {
        font-size: 11px;

        margin-bottom: 17px;
    }


    .cctv-content h2 {
        font-size: 2rem;
    }


    .cctv-description {
        font-size: 13px;
        line-height: 1.8;

        margin-bottom: 22px;
    }


    /* BUTTON */

    .cctv-buttons {
        flex-direction: column;

        width: 100%;

        margin-bottom: 25px;
    }


    .btn-cctv-primary,
    .btn-cctv-outline {
        width: 100%;

        justify-content: center;
    }


    /* FEATURES */

    .cctv-features {
        flex-direction: column;

        gap: 12px;
    }


    .cctv-feature {
        width: 100%;

        padding: 0;
        margin: 0;

        border-right: 0;
    }


    
    /* IMAGE */

    .cctv-visual {
        min-height: 330px;
    }


    .cctv-main-image {
        width: 330px;
        max-width: 85%;

        height: 280px;
    }


    /* Floating */

    .location-card {
        top: 10px;
        right: 15px;
    }


    .secure-card {
        right: 15px;
        bottom: 15px;
    }


    .cctv-floating-card {
        padding: 9px 11px;
    }


    .floating-icon {
        width: 33px;
        height: 33px;

        flex-basis: 33px;
    }

}


/* =====================================================
   SMALL MOBILE
===================================================== */

@media (max-width: 480px) {

    .cctv-content {
        padding:
            27px 18px 5px;
    }


    .cctv-content h2 {
        font-size: 1.7rem;
    }


    .cctv-visual {
        min-height: 290px;
    }


    .cctv-main-image {
        width: 290px;
        height: 240px;
    }

}




/* =====================================================
   HERO CAROUSEL
===================================================== */

#heroCarousel {
    position: relative;
    width: 100%;
    overflow: hidden;
}


/* Fade */
#heroCarousel .carousel-item {
    transition: opacity 0.8s ease-in-out;
}


/* =====================================================
   SAME HEIGHT
   ทำให้ Hero ทั้ง 2 Slide สูงเท่ากัน
===================================================== */

#heroCarousel .hero-slide {
    width: 100%;

    height: 570px;
    min-height: 570px;

    display: flex;
    align-items: center;

    padding-top: 40px;
    padding-bottom: 75px;
}


/* container */
#heroCarousel .hero-content {
    width: 100%;
}


/* row สูงเต็ม Hero */
#heroCarousel .hero-row {
    min-height: 430px;
}


/* =====================================================
   HIGHLIGHT
===================================================== */

.hero-highlight {
    color: #ffd76a;
}


/* =====================================================
   CCTV IMAGE
===================================================== */

#heroCarousel .cctv-visual {
    position: relative;

    width: 100%;
    height: 430px;
    min-height: 430px;

    display: flex;
    align-items: center;
    justify-content: center;
}


#heroCarousel .cctv-main-image {
    position: relative;

    z-index: 3;

    width: 520px;
    max-width: 100%;

    height: 390px;

    object-fit: contain;

    filter:
        drop-shadow(
            0 20px 30px rgba(20, 4, 50, 0.20)
        );
}



/* =====================================================
   AYPAO LOGO 
===================================================== */

#heroCarousel .hero-image-scale {
    width: 100%;
    height: 430px;

    display: flex;
    align-items: center;
    justify-content: center;

    /* ขยายทุกอย่างในกล่อง */
    transform: scale(1.1);

    transform-origin: center center;

    position: relative;
    z-index: 5;
}


#heroCarousel .hero-image {
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: visible;
}


#heroCarousel .hero-image img {
    display: block;

    width: 100%;
    max-width: 600px;

    height: auto;

    object-fit: contain;
}




/* =====================================================
   INDICATORS
===================================================== */

#heroCarousel .carousel-indicators {
    position: absolute;

    bottom: 35px;

    z-index: 20;

    margin-bottom: 0;
}


#heroCarousel .carousel-indicators button {
    width: 9px;
    height: 9px;

    padding: 0;

    margin: 0 5px;

    border: 0;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.55);

    opacity: 1;

    transition: all 0.25s ease;
}


#heroCarousel .carousel-indicators button.active {
    width: 28px;

    border-radius: 10px;

    background: #ffffff;
}


/* =====================================================
   PREV / NEXT
===================================================== */

.hero-carousel-control {
    width: 70px;

    opacity: 0;

    z-index: 15;

    transition: opacity 0.25s ease;
}


/* เอาเมาส์เข้า Hero จึงแสดง */
#heroCarousel:hover .hero-carousel-control {
    opacity: 1;
}


.hero-carousel-arrow {
    width: 44px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background:
        rgba(255, 255, 255, 0.13);

    border:
        1px solid rgba(255, 255, 255, 0.25);

    color: #ffffff;

    font-size: 15px;

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    transition: all 0.25s ease;
}


.hero-carousel-arrow:hover {
    background: #ffffff;

    color: #6425bd;

    transform: scale(1.08);
}


/* =====================================================
   TABLET
===================================================== */

@media (max-width: 991.98px) {

    /*
       Tablet ให้ความสูงปรับตาม content
       เพราะ 2 column จะกลายเป็นบน/ล่าง
    */

    #heroCarousel .hero-slide {
        height: auto;
        min-height: 650px;

        padding-top: 50px;
        padding-bottom: 85px;
    }


    #heroCarousel .hero-row {
        min-height: auto;
    }


    #heroCarousel .cctv-visual {
        height: 350px;
        min-height: 350px;

        margin-top: 20px;
    }


    #heroCarousel .cctv-main-image {
        width: 430px;
        height: 330px;
    }


    /* ซ่อนลูกศรบน tablet */
    .hero-carousel-control {
        display: none;
    }

}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 767.98px) {

    #heroCarousel .hero-slide {
        height: auto;
        min-height: 650px;

        padding-top: 38px;
        padding-bottom: 75px;
    }


    #heroCarousel .hero h1 {
        font-size: 2rem;
        line-height: 1.3;
    }


    #heroCarousel .hero p {
        font-size: 0.88rem;
        line-height: 1.75;
    }


    /* ไม่บังคับ <br> บนมือถือ */
    #heroCarousel .hero p br {
        display: none;
    }


    /* CCTV */
    #heroCarousel .cctv-visual {
        height: 300px;
        min-height: 300px;

        margin-top: 15px;
    }


    #heroCarousel .cctv-main-image {
        width: 330px;
        height: 270px;
    }


    /* Indicators */
    #heroCarousel .carousel-indicators {
        bottom: 22px;
    }

}


/* =====================================================
   SMALL MOBILE
===================================================== */

@media (max-width: 575.98px) {

    #heroCarousel .hero-slide {
        min-height: 640px;

        padding-top: 30px;
        padding-bottom: 65px;
    }


    #heroCarousel .hero h1 {
        font-size: 1.7rem;
    }


    #heroCarousel .cctv-visual {
        height: 270px;
        min-height: 270px;
    }


    #heroCarousel .cctv-main-image {
        width: 285px;
        height: 240px;
    }


    /*
       มือถือเล็กซ่อน Floating Card
       ป้องกันบังรูป CCTV
    */
    #heroCarousel .cctv-floating-card {
        display: none;
    }

}