/* Custom Styling for Dhan Sanchai Website */
body {
    font-family: 'Poppins', sans-serif;
    color: #333;
    background-color: #fcfcfc;
    overflow-x: hidden;
    width: 100%;
}

/* Colors */
:root {
    --primary-color: #0056b3;
    --secondary-color: #dc3545;
    --dark-color: #171a22;
    --semrush-orange: #ff642d;
    --semrush-blue: #0056b3;
    --light-grey: #f4f5f9;
    --border-color: #e0e0e0;
}

/* Top Utility Bar */
.top-bar {
    background-color: var(--light-grey);
    border-bottom: 1px solid var(--border-color);
    color: #555;
}

.top-bar .hover-primary:hover {
    color: var(--primary-color) !important;
}

/* Navbar */
.main-navbar {
    padding: 0.8rem 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    border-bottom: none;
    z-index: 1025;
}

.main-navbar.navbar-scrolled {
    padding: 0.4rem 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.main-navbar.navbar-scrolled .navbar-logo {
    height: 45px;
}

.navbar-logo {
    height: 55px;
    width: auto;
    transition: height 0.3s ease;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--dark-color) !important;
    font-size: 0.95rem;
    padding: 0.5rem 1.2rem !important;
    transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--semrush-orange) !important;
}

/* Dropdown Menu (Semrush Style) */
.dropdown-menu {
    border: none;
    min-width: 280px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    padding: 1rem 0;
    margin-top: 0;
    z-index: 1100;
}

@media (min-width: 1200px) {
    .dropdown:hover > .dropdown-menu {
        display: block !important;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .dropdown-menu {
        display: none;
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .dropdown:hover > .dropdown-toggle::after {
        transform: rotate(180deg);
    }

    .dropdown-toggle::after {
        transition: transform 0.3s ease;
    }
}

.dropdown-item {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--dark-color);
    padding: 0.7rem 1.5rem;
    transition: all 0.2s ease;
}

.dropdown-item i {
    font-size: 1.1rem;
    width: 25px;
    opacity: 0.8;
}

.dropdown-item:hover {
    background-color: var(--light-grey);
    color: var(--semrush-orange) !important;
    padding-left: 1.8rem;
}

/* Navbar Buttons */
.btn-login {
    color: var(--dark-color);
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.btn-login:hover {
    color: var(--semrush-orange);
}

.btn-signup {
    background-color: var(--semrush-orange);
    color: #fff;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.6rem 1.5rem !important;
    box-shadow: 0 4px 12px rgba(255, 100, 45, 0.2);
    transition: all 0.3s ease;
}

.btn-signup:hover {
    background-color: #e55a28;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 100, 45, 0.3);
}

/* Mobile Menu Styling */
@media (max-width: 1199.98px) {
    .navbar-collapse {
        background: #fff;
        padding: 1rem;
        margin-top: 0.5rem;
        border-top: 1px solid var(--border-color);
        max-height: 80vh;
        overflow-y: auto;
    }
    .navbar-nav .nav-link {
        padding: 0.8rem 0 !important;
        border-bottom: 1px solid var(--light-grey);
    }
    .dropdown-menu {
        box-shadow: none;
        padding-left: 1rem;
        margin-top: 0;
        border-left: 2px solid var(--semrush-orange);
        display: none;
        position: static !important;
        float: none;
        width: 100%;
    }
    .dropdown-menu.show {
        display: block;
    }
    .navbar-actions {
        flex-direction: column;
        width: 100%;
        padding: 1.5rem 0;
        gap: 1rem !important;
    }
    .btn-login, .btn-signup {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .navbar-logo {
        height: 40px;
    }
}

.btn-primary.rounded-pill {
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 86, 179, 0.2);
    transition: all 0.3s ease;
}

.btn-primary.rounded-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 86, 179, 0.3);
}

.dropdown-item:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* Page Banner */
.page-banner {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
}

.page-banner h1 {
    color: #333;
    letter-spacing: -1px;
}

/* Hero Section */
#heroCarousel .carousel-item {
    height: 550px;
}

#heroCarousel .carousel-item img {
    height: 550px;
    object-fit: cover;
}

#heroCarousel .carousel-caption {
    bottom: 25%;
    max-width: 600px;
}

@media (max-width: 1400px) {
    #heroCarousel .carousel-item,
    #heroCarousel .carousel-item img {
        height: 450px;
    }
}

@media (max-width: 992px) {
    #heroCarousel .carousel-item,
    #heroCarousel .carousel-item img {
        height: 400px;
    }
    #heroCarousel .carousel-caption {
        bottom: 15%;
    }
    #heroCarousel .carousel-caption h2 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    #heroCarousel .carousel-item,
    #heroCarousel .carousel-item img {
        height: 300px;
    }
    #heroCarousel .carousel-caption {
        bottom: 10%;
        left: 5%;
        right: 5%;
        text-align: center !important;
    }
    #heroCarousel .carousel-caption h2 {
        font-size: 1.8rem;
    }
    #heroCarousel .carousel-caption p {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    #heroCarousel .carousel-item,
    #heroCarousel .carousel-item img {
        height: 250px;
    }
    #heroCarousel .carousel-caption h2 {
        font-size: 1.4rem;
    }
    .navbar-logo {
        height: 45px;
    }
}

/* Typography Responsiveness */
h1, .h1 { font-size: calc(1.375rem + 1.5vw); }
h2, .h2 { font-size: calc(1.325rem + 0.9vw); }
h3, .h3 { font-size: calc(1.3rem + 0.6vw); }

@media (min-width: 1200px) {
    h1, .h1 { font-size: 3rem; }
    h2, .h2 { font-size: 2.25rem; }
    h3, .h3 { font-size: 1.75rem; }
}

/* Cards */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

/* Contact Cards */
.contact-card {
    background-color: #fff;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid #eee !important;
    position: relative;
    overflow: hidden;
}

.contact-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.contact-card:hover::after {
    transform: scaleX(1);
}

.contact-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1) !important;
    border-color: var(--primary-color) !important;
}

.icon-wrapper {
    width: 60px;
    height: 60px;
    background-color: rgba(0, 86, 179, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.contact-card:hover .icon-wrapper {
    background-color: var(--primary-color);
}

.contact-card:hover .icon-wrapper i {
    color: #fff !important;
}

/* Form Styling */
.form-control:focus {
    box-shadow: none;
    border-color: var(--primary-color);
}

.btn-danger {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-danger:hover {
    background-color: #bb2d3b;
    border-color: #b02a37;
}

/* Footer */
footer {
    background-color: var(--dark-color) !important;
}

.social-links a {
    display: inline-block;
    width: 35px;
    height: 35px;
    background-color: #333;
    border-radius: 50%;
    text-align: center;
    line-height: 35px;
    transition: all 0.3s ease;
    color: #fff !important;
}

.social-links a:hover {
    background-color: var(--primary-color);
}

/* Member Cards */
.member-card {
    transition: all 0.3s ease;
    border-color: rgba(0,0,0,0.08) !important;
}

.member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
    border-color: var(--primary-color) !important;
}

.member-item {
    transition: all 0.3s ease;
}

.member-item:hover {
    background-color: #fff !important;
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05) !important;
}

/* Hover Overlays */
.hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 86, 179, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover .hover-overlay {
    opacity: 1;
}

/* General Responsiveness Fixes */
.container {
    max-width: 1400px;
}

@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }
}

img {
    max-width: 100%;
    height: auto;
}

.btn-lg {
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .btn-lg {
        padding: 0.6rem 1.5rem;
        font-size: 1rem;
    }
    .py-5 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    .display-4 {
        font-size: 2.2rem;
    }
}

/* Utility */
.icon-box {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Fix for horizontal scroll on some mobile browsers */
.row {
    margin-left: 0;
    margin-right: 0;
}

.row > * {
    padding-left: 15px;
    padding-right: 15px;
}

