/* 
   Kaptebee Website Styles
   Primary Colors: Green theme
*/

:root {
    --primary-color: #2e7d32;      /* Dark Green */
    --primary-light: #60ad5e;      /* Light Green */
    --primary-dark: #005005;       /* Very Dark Green */
    --accent-color: #43a047;       /* Medium Green */
    --text-light: #ffffff;
    --text-dark: #212121;
    --bg-light: #f5f5f5;
    --bg-gray: #eeeeee;
    --transition-speed: 0.3s;
}

/* General Styles */
body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

.section-title {
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--accent-color);
}

/* Navbar Styles */
.navbar {
    background-color: var(--primary-color);
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all var(--transition-speed);
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.navbar-dark .navbar-nav .nav-link {
    color: var(--text-light);
    font-weight: 500;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all var(--transition-speed);
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    background-color: var(--primary-light);
    color: var(--text-light);
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-light);
}

.brand-text {
    position: relative;
}

.brand-text::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--text-light);
    transform: scaleX(0);
    transition: transform var(--transition-speed);
    transform-origin: right;
}

.navbar-brand:hover .brand-text::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Logo styling for navbar */
.navbar-logo {
    height: 50px;
    width: auto;
    margin-right: 12px;
    vertical-align: middle;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

/* Optional hover effect for logo */
.navbar-logo:hover {
    transform: scale(1.05);
}

/* Ensure brand elements align properly */
.navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.brand-text {
    line-height: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar-logo {
        height: 35px;
        margin-right: 8px;
    }
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background-color: var(--primary-dark);
    z-index: 1050;
    transition: all var(--transition-speed);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    padding: 1rem;
    background-color: var(--primary-color);
    display: flex;
    justify-content: flex-end;
}

.close-btn {
    color: var(--text-light);
    background: transparent;
    border: none;
    font-size: 1.5rem;
}

.close-btn:hover {
    color: var(--bg-light);
}

.sidebar-content {
    padding: 1rem 0;
}

.sidebar .nav-link {
    color: var(--text-light);
    padding: 1rem 1.5rem;
    transition: all var(--transition-speed);
    border-left: 4px solid transparent;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background-color: var(--primary-color);
    border-left-color: var(--text-light);
}

/* Main Content */
.main-content {
    transition: margin-left var(--transition-speed);
}

.main-content.sidebar-active {
    margin-left: 280px;
}

/* Top Section */
.top-section {
    background: linear-gradient(to right, var(--primary-dark), var(--primary-color));
    color: var(--text-light);
    padding: 5rem 0;
    margin-bottom: 3rem;
}

.top-section h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.top-section .lead {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
}

.top-buttons .btn {
    margin-right: 1rem;
    margin-top: 1rem;
    padding: 0.5rem 1.5rem;
}

.btn-primary {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.top-image {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transition: transform var(--transition-speed);
}

.top-image:hover {
    transform: translateY(-5px);
}

/* Admin Carousel Section */
.admin-carousel-section {
    padding: 4rem 0;
    background-color: var(--bg-light);
}

.admin-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    max-width: 900px;
}

.admin-card .card-body {
    padding: 2rem;
}

.admin-card .card-title {
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.admin-card .card-subtitle {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-weight: 500;
}

.admin-card small {
    font-style: italic;
    color: #666;
}

.carousel-control-prev,
.carousel-control-next {
    width: 5%;
}

.carousel-indicators {
    bottom: -40px;
}

.carousel-indicators button {
    background-color: var(--primary-color);
    opacity: 0.5;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 5px;
}

.carousel-indicators button.active {
    opacity: 1;
}

/* Featured Programs */
.featured-programs {
    padding: 4rem 0;
    background-color: var(--bg-gray);
}

.featured-programs .card {
    border: none;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform var(--transition-speed);
}

.featured-programs .card:hover {
    transform: translateY(-10px);
}

.featured-programs .card-img-top {
    height: 200px;
    object-fit: cover;
}

.featured-programs .card-title {
    color: var(--primary-dark);
}

.featured-programs .card-body {
    padding: 1.5rem;
}

/* Video Section Styles */
.video-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
}

.video-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(40, 167, 69, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(40, 167, 69, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.video-section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.video-section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #28a745, #20c997);
    border-radius: 2px;
}

.video-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.video-frame {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    border-radius: 20px;
    overflow: hidden;
    background: #000;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Animated Border */
.video-frame::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(
        45deg,
        #28a745,
        #20c997,
        #17a2b8,
        #28a745,
        #20c997,
        #17a2b8
    );
    background-size: 400% 400%;
    border-radius: 23px;
    z-index: -1;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Pulsing glow effect */
.video-frame::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(45deg, #28a745, #20c997);
    border-radius: 25px;
    z-index: -2;
    opacity: 0;
    animation: pulse 2s ease-in-out infinite alternate;
}

@keyframes pulse {
    0% {
        opacity: 0;
        transform: scale(1);
    }
    100% {
        opacity: 0.3;
        transform: scale(1.02);
    }
}

.video-frame iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 17px;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 17px;
}

.video-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.play-button {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #28a745, #20c997);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    transition: all 0.3s ease;
    box-shadow: 
        0 10px 30px rgba(40, 167, 69, 0.4),
        0 0 0 0 rgba(40, 167, 69, 0.7);
    animation: playButtonPulse 2s infinite;
}

@keyframes playButtonPulse {
    0% {
        box-shadow: 
            0 10px 30px rgba(40, 167, 69, 0.4),
            0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    70% {
        box-shadow: 
            0 10px 30px rgba(40, 167, 69, 0.4),
            0 0 0 20px rgba(40, 167, 69, 0);
    }
    100% {
        box-shadow: 
            0 10px 30px rgba(40, 167, 69, 0.4),
            0 0 0 0 rgba(40, 167, 69, 0);
    }
}

.play-button:hover {
    transform: scale(1.1);
    background: linear-gradient(135deg, #218838, #1eb887);
}

.play-button i {
    margin-left: 4px; /* Slight offset for play icon visual balance */
}

/* Responsive Design */
@media (max-width: 768px) {
    .video-section-title {
        font-size: 2rem;
    }
    
    .play-button {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .video-frame {
        border-radius: 15px;
    }
    
    .video-frame::before {
        border-radius: 18px;
    }
    
    .video-frame iframe {
        border-radius: 12px;
    }
    
    .video-overlay {
        border-radius: 12px;
    }
}
/* Latest News Section */
.latest-news {
    padding: 4rem 0;
    background-color: var(--bg-light);
}

.news-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform var(--transition-speed);
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-speed);
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
    order: 1;
}

.news-card p {
    margin-bottom: 1rem;
    color: #666;
    flex-grow: 1;
    order: 2;
}

.news-date {
    color: var(--accent-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
    order: 3;
}

.read-more {
    color: var(--accent-color);
    font-weight: 500;
    text-decoration: none;
    position: relative;
    align-self: flex-start;
    order: 4;
}

.read-more::after {
    content: '→';
    position: relative;
    top: 0;
    right: -5px;
    transition: right var(--transition-speed);
}

.read-more:hover::after {
    right: -10px;
}

/* Footer */
.site-footer {
    background-color: var(--primary-dark);
    color: var(--text-light);
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

.site-footer h5 {
    color: var(--text-light);
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.site-footer h5::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-light);
}

.footer-links {
    list-style: none;
    padding-left: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color var(--transition-speed);
}

.footer-links a:hover {
    color: var(--text-light);
    text-decoration: none;
}

.social-icons a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.5rem;
    margin-right: 1rem;
    transition: color var(--transition-speed);
}

.social-icons a:hover {
    color: var(--text-light);
}

.copyright-text {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
    .hero-section {
        padding: 3rem 0;
        text-align: center;
    }
    
    .hero-section img {
        margin-top: 2rem;
    }
    
    .navbar-brand {
        font-size: 1.5rem;
    }
}

@media (max-width: 767.98px) {
    .admin-card .card-body {
        padding: 1.5rem;
    }
    
    .admin-card .card-title {
        font-size: 1.25rem;
    }
    
    .admin-card .card-subtitle {
        font-size: 1rem;
    }
    
    .featured-programs .card-img-top {
        height: 180px;
    }
    
    .site-footer [class^="col-"] {
        margin-bottom: 2rem;
    }
}

/* Additional CSS for better button spacing on mobile devices */

/* Increase margin between text and buttons on all devices */
.top-buttons {
    margin-top: 2rem;
}

/* Specific adjustments for mobile devices */
@media (max-width: 767.98px) {
    .top-section {
        padding: 3rem 0;
    }
    
    .top-section h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .top-section .lead {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    .top-section p {
        margin-bottom: 1.5rem;
    }
    
    /* Increase spacing between buttons and content above */
    .top-buttons {
        margin-top: 2.5rem;
    }
    
    /* Add spacing between buttons themselves */
    .top-buttons .btn {
        margin-right: 0.5rem;
        margin-bottom: 1rem;
        display: inline-block;
    }
        /* Stack buttons vertically on very small screens */
    @media (max-width: 768px) {
        .top-buttons .btn {
            display: inline-block;
            width: 100%;
            margin-bottom: 0.75rem;
        }
        
        .top-buttons .btn:last-child {
            margin-bottom: 5px;
        }
    }
    /* Stack buttons vertically on very small screens */
    @media (max-width: 768px) {
        .top-buttons .btn {
            display: inline-block;
            width: 100%;
            margin-bottom: 0.75rem;
        }
        
        .top-buttons .btn:last-child {
            margin-bottom: 5px;
        }
    }
}