/* ==========================================
   CUSTOM CSS FOR VIETTEL TEMPLATE
   ========================================== */

/* Global Styles */
:root {
    --viettel-red: #E30613;
    --viettel-dark-red: #C00512;
    --viettel-bg: #f8f9fa;

    /* Theme Variables - Default (Viettel) */
    --theme-primary: #E30613;
    --theme-primary-dark: #C00512;
    --theme-primary-light: #FF1744;
    --theme-gradient-start: #6B0F1A;
    --theme-gradient-mid: #E30613;
    --theme-gradient-end: #FF1744;
}

/* Vinaphone Theme */
body[data-theme="vinaphone"] {
    --theme-primary: #0066CC;
    --theme-primary-dark: #0054A6;
    --theme-primary-light: #3399FF;
    --theme-gradient-start: #003D7A;
    --theme-gradient-mid: #0066CC;
    --theme-gradient-end: #3399FF;
}

/* Mobile Theme - Combination of Viettel Red and Vinaphone Blue */
body[data-theme="mobile"] {
    --theme-primary: #7A2F5B;
    --theme-primary-dark: #5A1F3F;
    --theme-primary-light: #9A4F7B;
    --theme-gradient-start: #E30613;
    --theme-gradient-mid: #7A2F5B;
    --theme-gradient-end: #0066CC;
}

body {
    font-family: 'Inter', sans-serif;
    color: #333;
    transition: all 0.3s ease;
}

/* Header Styles */
.navbar {
    transition: all 0.3s ease;
}

.brand-text {
    color: var(--theme-primary);
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.nav-link {
    font-weight: 500;
    color: #333;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--theme-primary);
}

/* Hero Slideshow Styles */
.hero-slideshow {
    position: relative;
    overflow: hidden;
}

/* Provider Logos Mobile - Open Tab Effect */
.provider-logos-mobile {
    background-color: #fff;
    padding: 15px 0 0 0;
    border-bottom: 2px solid #e0e0e0;
    position: relative;
}

.provider-logos-mobile .logos-wrapper {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    gap: 10px;
    padding: 0 10px;
}

.provider-logos-mobile .logo-link {
    display: inline-block;
    border: 2px solid #cecece;
    border-bottom: 2px solid #e0e0e0;
    border-radius: 8px 8px 0 0;
    padding: 8px 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    height: 50px;
    position: relative;
    background-color: #e0e0e0;
    margin-bottom: -2px;
}

.provider-logos-mobile .logo-link:hover {
    border-color: #999;
    transform: translateY(-2px);
}

.provider-logos-mobile .logo-link.active {
    background-color: #fff;
    border-color: #e0e0e0;
    border-bottom: 2px solid #fff;
    z-index: 10;
    height: 54px;
    transform: translateY(2px);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.provider-logos-mobile .ic {
    display: inline-block;
    background: url(../images/logo_mang.svg?v=3) no-repeat;
    width: 80px;
    height: 35px;
}

.provider-logos-mobile .ic-viettel {
    background-position: 0 0;
    margin-top: 4px;
}

.provider-logos-mobile .ic-vinaphone {
    background-position: -80px 3px;
}

.provider-logos-mobile .ic-mobifone {
    background-position: -160px 3px;
}

.hero-slide-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    max-height: 600px;
}

/* Ensure carousel has proper height */
.hero-slideshow .carousel-inner,
.hero-slideshow .carousel-item {
    height: auto;
}

/* Carousel controls */
.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    z-index: 3;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    padding: 0.5rem;
}

.carousel-indicators {
    z-index: 3;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 0;
    margin: 0 5px;
}

/* Carousel fade animation */
.carousel-fade .carousel-item {
    opacity: 0;
    transition-duration: 1s;
    transition-property: opacity;
}

.carousel-fade .carousel-item.active,
.carousel-fade .carousel-item-next.carousel-item-start,
.carousel-fade .carousel-item-prev.carousel-item-end {
    opacity: 1;
}

.carousel-fade .active.carousel-item-start,
.carousel-fade .active.carousel-item-end {
    opacity: 0;
}

.carousel-fade .carousel-item-next,
.carousel-fade .carousel-item-prev,
.carousel-fade .carousel-item.active,
.carousel-fade .active.carousel-item-start,
.carousel-fade .active.carousel-item-end {
    transform: translateX(0);
}

/* Packages Section Styles */
.packages-section {
    background-color: #ffffff;
}

.nav-pills .nav-link {
    color: #666;
    border-radius: 50px;
    padding: 10px 30px;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.nav-pills .nav-link:hover {
    background-color: rgba(227, 6, 19, 0.1);
    color: var(--theme-primary);
}

.nav-pills .nav-link.active {
    background-color: var(--theme-primary);
    color: white;
}

/* Package Card Styles */
.package-card {
    position: relative;
    border-radius: 15px;
    transition: all 0.3s ease;
    border: 1px solid var(--theme-primary);
    overflow: visible;
}

/* Hot package card - thicker border */
.package-card.border-danger {
    border-width: 2px;
}

.package-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(227, 6, 19, 0.2);
    border-color: var(--theme-primary);
}

/* Fix dropdown menu overflow */
.package-card .dropdown {
    position: relative;
}

.package-card .dropdown-menu {
    z-index: 1050;
}

.package-card .card-body {
    overflow: visible;
    display: flex;
    flex-direction: column;
}

/* Push buttons to bottom of card */
.package-card .d-grid {
    margin-top: auto;
}

/* Ensure card with open dropdown is on top */
.package-card:has(.dropdown-menu.show) {
    z-index: 100;
}

/* Package code badge style */
.badge-package {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--theme-primary);
    color: #fff;
    font-weight: 700;
    border-radius: 0 0 8px 8px;
    font-size: 0.85rem;
    border: 1px solid var(--theme-primary);
    border-top: none;
    z-index: 10;
    padding: 10px 20px;
    margin-bottom: 1rem !important;
    box-shadow: 0 2px 8px 0 rgba(112, 4, 4, 0.30);
}

/* Hot badge style - Corner Ribbon */
.badge-hot {
    position: absolute;
    top: 0;
    left: 0;
    width: 90px;
    height: 90px;
    overflow: hidden;
    z-index: 11;
    pointer-events: none;
}

.badge-hot::before {
    content: "Ưu đãi";
    position: absolute;
    top: 15px;
    left: -30px;
    width: 120px;
    padding: 5px 0;
    background: linear-gradient(135deg, #e5ff41 0%, #ff4b2b 100%);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    transform: rotate(-45deg);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.badge-hot::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
}

/* Benefits summary visible */
.benefits-summary {
    display: block;
}

/* Package duration buttons */
.package-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.package-duration-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.25rem;
}

.btn-duration {
    background-color: var(--theme-primary);
    border-color: var(--theme-primary);
    color: white;
    font-weight: 600;
    padding: 0.4rem 0.2rem;
    font-size: 0.75rem;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
}

.btn-duration:hover {
    background-color: var(--theme-primary-dark);
    border-color: var(--theme-primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Package group styles */
.package-group {
    margin-bottom: 2rem;
}

.package-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e0e0e0;
}

.package-group-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.package-group-link {
    color: var(--theme-primary);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
}

.package-group-link:hover {
    text-decoration: underline;
}

.package-card .card-title {
    color: #333;
    font-weight: 700;
    margin-bottom: 1rem;
}

.package-card .card-title small {
    font-size: 0.6em;
    color: #666;
}

.package-icons {
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.price-tag {
    color: var(--theme-primary);
    transition: color 0.3s ease;
}

.price-tag .fs-4 {
    font-weight: 700;
}

/* Button Styles */
.btn-danger,
.theme-btn {
    background-color: var(--theme-primary);
    border-color: var(--theme-primary);
    transition: all 0.3s ease;
    color: white;
}

.btn-danger:hover,
.theme-btn:hover {
    background-color: var(--theme-primary-dark);
    border-color: var(--theme-primary-dark);
    transform: scale(1.05);
    color: white;
}

.btn-outline-danger {
    color: var(--theme-primary);
    border-color: var(--theme-primary);
}

.btn-outline-danger:hover {
    background-color: var(--theme-primary);
    border-color: var(--theme-primary);
    color: white;
}

.btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

/* Hot Packages Section */
.hot-packages h3 {
    color: #333;
}

.hot-packages .package-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(227, 6, 19, 0.2);
    border-color: var(--theme-primary);
}


/* Footer Styles */
.footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

.footer h5 {
    /*color: var(--theme-primary);*/
    position: relative;
    padding-bottom: 10px;
    transition: color 0.3s ease;
}

.footer h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: #ffffff;
    transition: background-color 0.3s ease;
}

.footer a {
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--theme-primary) !important;
}

/* Header Navigation Pills - Desktop */
@media (min-width: 992px) {
    .navbar-expand-lg .navbar-collapse .nav-pills {
        flex-direction: row !important;
    }

    .navbar-expand-lg .navbar-collapse {
        display: flex !important;
        flex-basis: auto;
    }

    .navbar-expand-lg .navbar-collapse .nav-pills .nav-item {
        width: auto !important;
    }
}

/* Responsive Styles */
@media (max-width: 991px) {
    /* Hero slideshow mobile */
    .hero-slide-image {
        min-height: 200px;
    }

    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 2rem;
        height: 2rem;
    }

    .carousel-indicators button {
        width: 8px;
        height: 8px;
    }

    .package-card {
        margin-bottom: 5px;
    }

    /* Mobile navigation - vertical */
    .navbar-collapse {
        border-top: 1px solid #dee2e6;
        margin-top: 0.5rem;
    }

    .navbar .nav-pills {
        flex-direction: column !important;
    }

    .navbar .nav-pills .nav-item {
        width: 100% !important;
        border-bottom: 1px solid #dee2e6;
    }

    .nav-pills .nav-link {
        margin: 5px 0;
        width: 100%;
    }

    .nav-pills .nav-link.active {
        border-radius: 4px;
    }

    /* Mobile: 2 cards per row - balanced spacing */
    .row.g-4 {
        --bs-gutter-x: 0.5rem;
        --bs-gutter-y: 0.5rem;
    }

    .package-card .card-body {
        padding: 0.75rem;
    }

    .package-card .card-title {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .package-card .card-title small {
        font-size: 0.7em;
    }

    .package-card .price-tag {
        margin-bottom: 0.5rem !important;
    }

    .package-card .price-tag .fs-4 {
        font-size: 1.1rem !important;
    }

    .package-card .price-tag .text-muted {
        font-size: 0.8rem;
    }

    .package-card .badge {
        font-size: 1rem;
        padding: 10px 20px;
        margin-bottom: 1rem !important;
        box-shadow: 0 2px 8px 0 rgba(112, 4, 4, 0.30);
    }

    .package-card .btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }

    .package-card .package-icons {
        height: 30px;
        margin-bottom: 0.5rem !important;
    }

    .package-card .package-icons i {
        font-size: 1.1rem !important;
    }

    .package-card .benefits-summary {
        font-size: 0.75rem;
        margin-bottom: 0.5rem !important;
    }

    /* Tab navigation on one line */
    .nav-underline {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .nav-underline::-webkit-scrollbar {
        display: none;
    }

    .nav-underline .nav-item {
        flex-shrink: 0;
    }

    .nav-underline .nav-link {
        white-space: nowrap;
        font-size: 0.85rem;
        padding: 0.5rem;
    }

    /* Package group section */
    .package-group-title {
        font-size: 1rem;
    }

    .badge-hot::before{
        top: 5px;
        left: -40px;
    }
}

/* Animation Utilities */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--theme-primary);
    border-radius: 5px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--theme-primary-dark);
}

/* Loading Animation */
.spinner-border-red {
    border-color: var(--theme-primary);
    border-right-color: transparent;
}

/* Badge Styles */
.badge.bg-warning {
    background-color: #ffc107 !important;
}

.badge.bg-danger {
    background-color: var(--theme-primary) !important;
    transition: background-color 0.3s ease;
}

/* Card Hover Effects */
.card {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.border-danger {
    border-color: var(--theme-primary) !important;
    transition: border-color 0.3s ease;
}

/* Utility Classes */
.bg-viettel-red {
    background-color: var(--viettel-red) !important;
}

.text-viettel-red {
    color: var(--viettel-red) !important;
}

.border-viettel-red {
    border-color: var(--viettel-red) !important;
}

/* Theme-aware utility classes */
.bg-theme-primary {
    background-color: var(--theme-primary) !important;
    transition: background-color 0.3s ease;
}

.text-theme-primary {
    color: var(--theme-primary) !important;
    transition: color 0.3s ease;
}

.border-theme-primary {
    border-color: var(--theme-primary) !important;
    transition: border-color 0.3s ease;
}

/* Input Placeholder Styles */
input::placeholder,
textarea::placeholder {
    color: #bbb !important;
    opacity: 0.7;
}

input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
    color: #bbb !important;
    opacity: 0.7;
}

input::-moz-placeholder,
textarea::-moz-placeholder {
    color: #bbb !important;
    opacity: 0.7;
}

input:-ms-input-placeholder,
textarea:-ms-input-placeholder {
    color: #bbb !important;
    opacity: 0.7;
}
.hotline-bottom {
    position: fixed;
    display: block;
    bottom: 15px;
    left: 9px;
    z-index: 999;
}
.hotline-bottom a {
    border: 1px solid #fff;
    color: #fff;
    font-weight: 700;
    padding: 3px 16px 3px 43px;
    background: #0070b3;
    border-radius: 50px;
    text-decoration: none;
    display: inline-block;
    font-size: 0.85rem;
}
.hotline-bottom .icon-phone {
    display: inline-block;
    width: 36px;
    height: 36px;
    position: absolute;
    top: 8px;
    left: 0;
    background: url("https://simthanglong.vn/static/theme/images/phone0.png") no-repeat top;
    -moz-animation: Rotate 1.3s linear 1.3s 5;
    -webkit-animation: Rotate 1.3s linear 1.3s 5;
    animation: Rotate 1.3s linear 1.3s 5;
    animation-iteration-count: infinite;
    -webkit-animation-iteration-count: infinite;
    -moz-animation-iteration-count: infinite;
    -o-animation-iteration-count: infinite;
    background-size: cover;
}
.hotline-bottom a .hotline-number {
    display: block;
}
.hotline-bottom a .hotline-number em {
    font-size: 85%;
    display: block;
}
@-moz-keyframes Rotate{
    0%{
        -webkit-transform:rotate(0)
    }
    4%{
        -webkit-transform:rotate(-45deg)
    }
    8%{
        -webkit-transform:rotate(0)
    }
    12%{
        -webkit-transform:rotate(-45deg)
    }
    16%{
        -webkit-transform:rotate(0)
    }
    20%{
        -webkit-transform:rotate(-45deg)
    }
    24%{
        -webkit-transform:rotate(0)
    }
    100%{
        -webkit-transform:rotate(0)
    }
}
@-webkit-keyframes Rotate{
    0%{
        -webkit-transform:rotate(0)
    }
    4%{
        -webkit-transform:rotate(-45deg)
    }
    8%{
        -webkit-transform:rotate(0)
    }
    12%{
        -webkit-transform:rotate(-45deg)
    }
    16%{
        -webkit-transform:rotate(0)
    }
    20%{
        -webkit-transform:rotate(-45deg)
    }
    24%{
        -webkit-transform:rotate(0)
    }
    100%{
        -webkit-transform:rotate(0)
    }
}
@keyframes Rotate{
    0%{
        -webkit-transform:rotate(0)
    }
    4%{
        -webkit-transform:rotate(-45deg)
    }
    8%{
        -webkit-transform:rotate(0)
    }
    12%{
        -webkit-transform:rotate(-45deg)
    }
    16%{
        -webkit-transform:rotate(0)
    }
    20%{
        -webkit-transform:rotate(-45deg)
    }
    24%{
        -webkit-transform:rotate(0)
    }
    100%{
        -webkit-transform:rotate(0)
    }
}
.zalo-bottom {
    position: fixed;
    display: block;
    bottom: 15px;
    right: 9px;
    z-index: 999;
}
.zalo-bottom a {
    position: relative;
}
.zalo-bottom a:before {
    content: "";
    width: 10px;
    height: 10px;
    display: block;
    -moz-border-radius: 50%;
    -webkit-border-radius: 50%;
    border-radius: 50%;
    background: red;
    position: absolute;
    right: 2px;
    top: -16px;
    border: 1px solid #fff;
}
.zalo-bottom a img {
    width: 50px;
    height: 50px;
    -moz-border-radius: 50%;
    -webkit-border-radius: 50%;
    border-radius: 50%;
    animation: gentle-shake 2.5s ease-in-out infinite;
}
@keyframes gentle-shake{
    0%,100%{
        transform:rotate(0deg)
    }
    10%{
        transform:rotate(5deg)
    }
    20%{
        transform:rotate(-5deg)
    }
    30%{
        transform:rotate(3deg)
    }
    40%{
        transform:rotate(-3deg)
    }
    50%{
        transform:rotate(0deg)
    }
}
