/* twccapp/static/twccapp/css/style.css */
:root {
    --primary-color: #2c3e50;
    --secondary-color: green;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
}

/* Nested dropdown styling */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -1px;
    margin-left: 0;
    border-radius: 0 6px 6px 6px;
}

.dropdown-submenu:hover .dropdown-menu {
    display: block;
}

.dropdown-submenu .dropdown-toggle::after {
    transform: rotate(-90deg);
    position: absolute;
    right: 10px;
    top: 50%;
    margin-top: -0.5em;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--dark-color);
}

.hero-section {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hero section with background image */
.twcc-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 
                url('../images/logo.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    padding: 100px 0;
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .twcc-hero {
        padding: 60px 0;
    }
    .twcc-hero h1 {
        font-size: 2.2rem;
    }
}

.bg-primary {
    background-color: green; !important;
}

.btn-primary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
}

.card {
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.faq-item {
    margin-bottom: 1rem;
}

.faq-question {
    font-weight: 600;
    color: var(--secondary-color);
}



footer {
    background-color: #3498db;
    color: white;
    padding: 2rem 0;
}



.hero-section {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('{% static 'twccapp/images/logo.png' %}');
    background-repeat: no-repeat;
    background-position: center center;
    min-height: 400px;
}

@media (max-width: 768px) {
    .hero-section {
        background-size: 80% auto; /* Adjust as needed for mobile */
    }
}

@media (min-width: 769px) {
    .hero-section {
        background-size: contain;
    }
}



/* Slider Section for Official Images */
.slider-section {
    margin: 0 auto;
    max-width: 1200px;
    position: relative;
}

.slider-image-wrapper {
    max-width: 90%; /* You can adjust this to 1000px or any fixed width if preferred */
    margin: 0 auto;  /* Centers the image */
    padding-left: 20px;  /* Adjust this value to control the amount of left padding */
}

.slider-image {
    width: 100%;
    height: 65vh;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 4px; /* Optional for rounded edges */
}


 /*.slider-section {
        position: relative;
        width: 100%;
    }*/

.slider-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
}
    
    .advert-column {
        background-color: #f8f9fa;
        border-right: 1px solid #dee2e6;
        height: 65vh;
        overflow-y: auto;
        padding: 0;
    }
    
    .advert-container {
        height: 100%;
        display: flex;
        flex-direction: column;
    }
    
    .advert-item {
        padding: 15px;
        border-bottom: 1px solid #dee2e6;
        position: relative;
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .pdf-btn {
        font-size: 0.8rem;
        padding: 4px 8px;
    }
    
    .link-indicator {
        position: absolute;
        bottom: 10px;
        right: 10px;
        font-size: 0.7rem;
        padding: 3px 6px;
    }
    
    .advert-content {
        text-align: center;
        padding: 10px;
    }
    
    .advert-title {
        color: #343a40;
        font-size: 1rem;
        margin-bottom: 10px;
    }
    
    .advert-image {
        max-height: 100px;
        width: auto;
        margin: 0 auto;
    }
    
    .advert-placeholder {
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #6c757d;
    }
    
    /* Real-time update styles */
    .advert-item.new-ad {
        animation: fadeIn 0.5s ease-in;
        background-color: rgba(25, 135, 84, 0.1);
    }
    
    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(20px); }
        to { opacity: 1; transform: translateY(0); }
    }
    
    @media (max-width: 768px) {
        .advert-column {
            height: auto;
            max-height: 150px;
            border-right: none;
            border-bottom: 1px solid #dee2e6;
        }
        
        .advert-container {
            flex-direction: row;
            overflow-x: auto;
            flex-wrap: nowrap;
        }
        
        .advert-item {
            min-width: 200px;
            border-bottom: none;
            border-right: 1px solid #dee2e6;
        }
    }

.carousel {
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/*.carousel-item img {
    height: 65vh;
    object-fit: cover;
    object-position: center;
    width: auto;
}*/

.carousel-item img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: auto; /* Optional: maintain natural width */
    max-width: 100%;
    height: 65vh;
    object-fit: cover;
    object-position: center;
}

.carousel-caption {
    bottom: 15%;
    left: 5%;
    font-size: 14px;
    right: 5%;
    text-align: left;
    padding: 0;
    display: block !important;
}

.caption-container {
    background-color: rgba(0, 0, 0, 1);
    border-radius: 5px;
    padding: 15px;
    max-width: 600px;
}

.caption-title {
    color: #fff;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.caption-text {
    color: #f8f9fa;
    font-size: 14px;
    line-height: 1.5;
    padding: 3.2;
    margin-inline-start: ;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .carousel-item img {
        height: 100vh;
    }
    
    .carousel-caption {
        bottom: 10%;
        display: block !important;
    }
    
    .caption-container {
        max-width: 80%;
    }
}

@media (max-width: 768px) {
    .carousel-item img {
        height: 40vh;
    }
    
    .carousel-caption {
        bottom: 5%;
        display: block !important;
    }
    
    .caption-title {
        font-size: 1.3rem;
    }
    
    .caption-text {
        font-size: 0.9rem;
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .carousel-item img {
        height: 35vh;
    }
    
    .caption-container {
        padding: 10px;
        max-width: 90%;
    }
    
    .caption-title {
        font-size: 1.1rem;
        margin-bottom: 5px;
    }
    
    .caption-text {
        font-size: 0.8rem;
        font-size: 14px;
        display: block !important; /* Hide caption on very small screens */
    }
}

/* Video Updates Section */
#video-updates .card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    border-radius: 10px;
    overflow: hidden;
}

#video-updates .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

#video-updates .ratio {
    background-color: #000;
}

#video-updates iframe {
    width: 100%;
    height: 100%;
}


.stat-item {
  padding: 20px;
  transition: transform 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-5px);
}

.stat-item h2 {
  color: #007bff; /* Bootstrap primary color - change as needed */
  margin-bottom: 10px;
}

.stat-item p {
  font-size: 1.1rem;
}


/* Principles Section Styling */
.principles-section {
  background-color: #f8fafc;
  overflow: hidden;
}

.principles-nav .nav-link {
  color: #495057;
  font-weight: 600;
  padding: 12px 20px;
  margin-bottom: 8px;
  border-radius: 8px;
  text-align: left;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.principles-nav .nav-link:hover {
  background-color: rgba(10, 36, 99, 0.05);
  color: #0a2463;
}

.principles-nav .nav-link.active {
  background-color: rgba(10, 36, 99, 0.1);
  color: #0a2463;
  border-left: 3px solid #0a2463;
}

.principles-nav .nav-link i {
  width: 24px;
  text-align: center;
}

.tab-content {
  min-height: 400px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Reduce white space in cards */
.tab-content {
  padding: 1rem !important; /* Reduced from p-4 (1.5rem) */
  min-height: auto; /* Remove fixed height */
}

/* Vision tab specific adjustments */
#vision .lead {
  margin-bottom: 0 !important;
}

#vision h2 {
  margin-bottom: 1rem !important; /* Reduced from mb-4 (1.5rem) */
}

/* Mission card adjustments */
.mission-card {
  padding: 1rem !important; /* Reduced from p-4 */
}


.divider {
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #0a2463, #3a86ff);
  border-radius: 2px;
}

.values-list li {
  padding: 15px;
  background-color: rgba(10, 36, 99, 0.03);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.values-list li:hover {
  background-color: rgba(10, 36, 99, 0.08);
  transform: translateX(5px);
}

.mission-card {
  transition: all 0.3s ease;
  height: 100%;
}

.mission-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.signature {
  border-top: 2px solid #0a2463;
  padding-top: 10px;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .principles-nav {
    flex-direction: row !important;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 10px;
  }
  
  .principles-nav .nav-link {
    display: inline-block;
    margin-bottom: 0;
    margin-right: 8px;
  }
}

@media (max-width: 767px) {
  .tab-content {
    padding: 20px !important;
  }
  
  .values-list li {
    margin-bottom: 15px;
  }
}



/* Header Section Styling */
.twcc-header {
  background-color: #f8f9fa;
  padding: 80px 0;
}

.twcc-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 8px;
}

.twcc-word {
  display: inline-block;
  position: relative;
  padding: 0 5px;
  color: #0a2463;
  font-size: 2.8rem;
  line-height: 1;
  white-space: nowrap;
}

.twcc-word:nth-child(1) { color: #3a86ff; } /* Tanzania */
.twcc-word:nth-child(2) { color: #3a86ff; } /* Women */
.twcc-word:nth-child(3) { color: #3a86ff; } /* Chamber */
.twcc-word:nth-child(4) { color: #3a86ff; } /* of */
.twcc-word:nth-child(5) { color: #3a86ff; } /* Commerce */

.twcc-word::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.twcc-word:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.divider-line {
  width: 150px;
  height: 4px;
  background: linear-gradient(90deg, #0a2463, #3a86ff);
  margin: 15px 0;
}

.twcc-tagline {
  font-size: 1.4rem;
  color: #555;
  font-weight: 500;
}

.header-image-container {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.header-image {
  transition: transform 0.5s ease;
}

.header-image:hover {
  transform: scale(1.03);
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(10, 36, 99, 0.2) 0%, rgba(58, 134, 255, 0.1) 100%);
}

/* Responsive Adjustments */
@media (max-width: 1199px) {
  .twcc-word {
    font-size: 2.4rem;
  }
}

@media (max-width: 991px) {
  .twcc-title {
    justify-content: center;
    text-align: center;
  }
  
  .divider-line {
    margin: 15px auto;
  }
  
  .twcc-tagline {
    text-align: center;
  }
}

@media (max-width: 767px) {
  .twcc-word {
    font-size: 2rem;
  }
  
  .twcc-tagline {
    font-size: 1.2rem;
  }
  
  .twcc-header {
    padding: 60px 0;
  }
}

@media (max-width: 575px) {
  .twcc-word {
    font-size: 1.6rem;
  }
}



/* Values Section Styling */
.values-section {
  z-index: 1;
  overflow: hidden;
}

.value-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  transition: all 0.3s ease;
  border-top: 4px solid #3a86ff;
  position: relative;
  overflow: hidden;
}

.value-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(10, 36, 99, 0.05) 0%, rgba(58, 134, 255, 0.02) 100%);
  z-index: -1;
}

.value-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.value-icon {
  width: 80px;
  height: 80px;
  background-color: #0a2463;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  transition: all 0.3s ease;
}

.value-card:hover .value-icon {
  background-color: #3a86ff;
  transform: rotate(15deg) scale(1.1);
}

.divider {
  width: 80px;
  height: 4px;
  border-radius: 2px;
}

.stats-box {
  position: relative;
  z-index: 2;
}

.stats-box h3 {
  color: #0a2463;
}

/* Responsive Adjustments */
@media (max-width: 767px) {
  .twcc-about .display-4 {
    font-size: 2.2rem;
  }
  
  .values-section .display-4 {
    font-size: 2.5rem;
  }
  
  .value-card {
    margin-bottom: 20px;
  }
  
  .stats-box .col-md-3 {
    margin-bottom: 20px;
  }
}

/* Typing animation container */
.header-typing-container {
  max-width: 100%;
  overflow: hidden;
}

/* Main heading styles */
.main-heading {
  font-size: 2rem;
  font-weight: 700;
  color: #1a73e8; /* TWCC blue */
  margin-bottom: 0.5rem;
  border-right: 3px solid #1a73e8; /* Cursor effect */
  white-space: nowrap;
  overflow: hidden;
}


/* Subtext styles */
.typing-subtext {
  font-size: 1.2rem;
  color: green;
  border-right: 3px solid #4CAF50; /* Different cursor color */
  white-space: nowrap;
  overflow: hidden;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .main-heading {
    font-size: 1.5rem;
    white-space: normal; /* Allow text wrapping */
    border-right: none; /* Remove cursor on mobile if needed */
  }
  
  .typing-subtext {
    font-size: 1rem;
    white-space: normal;
    border-right: none;
  }
}


.leadership-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
        justify-content: center;
    }
.leader-card {
        width: 250px;
        text-align: center;
    }
    .leader-card img {
        width: 150px;
        height: 150px;
        object-fit: cover;
        border-radius: 50%;
    }


.partner-logo {
    padding: 10px;
    transition: transform 0.3s;
}

.partner-logo:hover {
    transform: scale(1.05);
}

@media (max-width: 991.98px) {
  .navbar-collapse {
    position: fixed;
    top: 56px; /* Adjust based on your navbar height */
    left: 0;
    right: 0;
    background: #0d6efd; /* Match your navbar color */
    z-index: 1000;
    padding: 20px;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
  }
  
  .navbar-nav {
    padding-bottom: 20px;
  }
}
 .navbar-toggler {
            border: none;
            padding: 0.25rem 0.5rem;
            font-size: 1.25rem;
            background: transparent;
        }
        
        .navbar-toggler:focus {
            box-shadow: none;
        }
        /* Hamburger icon styles */
        .hamburger {
            display: inline-block;
            width: 30px;
            height: 20px;
            position: relative;
            cursor: pointer;
        }
        
        .hamburger span {
            display: block;
            position: absolute;
            height: 3px;
            width: 100%;
            background: white;
            border-radius: 9px;
            opacity: 1;
            left: 0;
            transform: rotate(0deg);
            transition: .25s ease-in-out;
        }
        
        .hamburger span:nth-child(1) {
            top: 0px;
        }
        
        .hamburger span:nth-child(2) {
            top: 8px;
        }
        
        .hamburger span:nth-child(3) {
            top: 16px;
        }
        
        /* X icon animation */
        .hamburger.active span:nth-child(1) {
            top: 8px;
            transform: rotate(135deg);
        }
        
        .hamburger.active span:nth-child(2) {
            opacity: 0;
            left: -60px;
        }
        
        .hamburger.active span:nth-child(3) {
            top: 8px;
            transform: rotate(-135deg);
        }

.hamburger span {
    transition: all 0.25s ease-in-out; /* Match Bootstrap's collapse duration */
}


.advert-scroll-container {
        height: 100vh; /* Adjust based on your needs */
        overflow: hidden;
        position: relative;
    }
    
    .advert-scroll-content {
        animation: scrollAds 20s linear infinite;
    }
    
    .advert-scroll-content:hover {
        animation-play-state: paused;
    }
    
    @keyframes scrollAds {
        0% {
            transform: translateY(0);
        }
        100% {
            transform: translateY(-100%);
        }
    }
    
    .advert-item {
        margin-bottom: 20px;
        transition: all 0.3s ease;
    }
    
    .advert-item:hover {
        transform: scale(1.02);
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }

/* Tree Structure for Board of Directors */
.board-container {
    width: 100%;
    overflow-x: auto;
    padding: 20px 0;
}

.tree {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    margin-top: 40px;
}

.tree-level {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 40px;
    position: relative;
}

/* Chairperson level (top of tree) */
.tree-level-1 {
    margin-bottom: 60px;
}

/* Directors level */
.tree-level-2 {
    margin-bottom: 40px;
}

/* Regional directors level */
.tree-level-3 {
    margin-bottom: 20px;
}

.leader-card.tree-node {
    position: relative;
    margin: 0 15px;
    text-align: center;
    min-width: 180px;
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    z-index: 1;
}

/* Connector lines */
.leader-card.tree-node::before,
.leader-card.tree-node::after {
    content: '';
    position: absolute;
    background: #aaa;
}

/* Vertical connector */
.leader-card.tree-node::before {
    width: 2px;
    height: 30px;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
}

/* Horizontal connector for children */
.leader-card.tree-node::after {
    width: calc(100% + 30px);
    height: 2px;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
}

/* Remove connectors from top level */
.tree-level-1 .leader-card.tree-node::before,
.tree-level-1 .leader-card.tree-node::after {
    display: none;
}

/* Adjust connectors for last node in level */
.tree-level .leader-card.tree-node:last-child::after {
    width: 50%;
    right: 50%;
    left: auto;
    transform: translateX(0);
}

.tree-level .leader-card.tree-node:first-child::after {
    width: 50%;
    left: 50%;
    transform: translateX(0);
}

.leader-image.tree-img {
    width: 80px;
    height: 80px;
    margin: 0 auto 10px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #fff;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

.leader-image.tree-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tree-name {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.tree-position {
    font-size: 0.8rem;
    color: #666;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .tree-level {
        flex-wrap: wrap;
    }
    .leader-card.tree-node {
        margin-bottom: 30px;
    }
    .leader-card.tree-node::before,
    .leader-card.tree-node::after {
        display: none;
    }
}

/* Container for partner logos */
.partners-container {
  display: flex;          /* Align logos in a row */
  overflow-x: auto;      /* Enable horizontal scroll */
  white-space: nowrap;   /* Prevent line breaks */
  gap: 20px;             /* Space between logos */
  padding: 10px 0;       /* Add padding */
  animation: scroll 20s linear infinite; /* Add animation (optional) */
}

/* Individual logo styling */
.partner-logo {
  flex: 0 0 auto;        /* Prevent shrinking/stretching */
  width: 120px;          /* Fixed width (adjust as needed) */
  height: auto;          /* Maintain aspect ratio */
}



@keyframes scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); } /* Adjust based on total width */
}


.partners-container {
  animation: scroll 20s linear infinite;
  width: 100%;
}

@media (max-width: 767px) {
  .partners-container {
    overflow-x: visible !important; /* Allow horizontal movement
    }
}



/* Center the slider section horizontally */
.slider-section {
    margin-left: auto;
    margin-right: auto;
    max-width: 1200px; /* Adjust this value based on your desired maximum width */
    width: 100%;
}

/* Ensure the container-fluid doesn't create unwanted padding */
.slider-section .container-fluid {
    padding-left: 0;
    padding-right: 0;
}

/* Center the row content */
.slider-section .row {
    justify-content: center;
}

/* Adjust the slider column width if needed */
.slider-section .col-md-10 {
    width: 100%;
    max-width: 1000px; /* Adjust based on your preference */
}

/* Center the carousel */
#mainCarousel {
    margin: 0 auto;
}

/* Optional: Center the carousel indicators */
.carousel-indicators {
    justify-content: center;
}

/* Optional: Center the carousel captions */
.carousel-caption {
    left: 0;
    right: 0;
    text-align: center;
}