/* assets/css/style.css - Further Fixes for Visibility & Contrast */

/* Updated Custom Styles with Red-Orange Color Scheme */
body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333 !important;
    overflow-x: hidden;
    background-color: #fff !important; /* Ensure body has white background for light sections */
}

/* Hero Section with Updated Parallax Effect - Enhanced Contrast */
.hero {
    background: linear-gradient(rgba(231, 76, 60, 0.95), rgba(243, 156, 18, 0.95)), url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="%23000" opacity="0.1" points="0,1000 1000,0 1000,1000"/></svg>'); /* Darker gradient, black SVG */
    background-size: cover;
    background-attachment: fixed;
    color: white !important;
    padding: 250px 0 150px; /* Increased top padding to account for fixed navbar */
    position: relative;
    margin-top: 76px; /* Offset for fixed navbar height */
}
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="%23000" opacity="0.3"/></svg>') repeat; /* Darker dots */
    animation: float 20s ease-in-out infinite;
    opacity: 0.8;
}
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Hero Text Enhancements */
.hero h1,
.hero p {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7) !important; /* Strong shadow for readability */
    color: #fff !important;
}
.hero .btn {
    text-shadow: none; /* No shadow on buttons */
}

/* Enhanced Feature Cards with Updated Glow */
.feature-card {
    transition: all 0.4s ease;
    height: 100%;
    border: none;
    background: white !important;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    color: #333 !important; /* Ensure card text is dark */
}
.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(231, 76, 60, 0.1), transparent);
    transition: left 0.5s;
}
.feature-card:hover::before {
    left: 100%;
}
.feature-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 40px rgba(231, 76, 60, 0.2) !important;
}
.feature-icon {
    font-size: 4rem;
    color: #e74c3c !important;
    margin-bottom: 1.5rem;
    transition: color 0.3s;
}
.feature-card:hover .feature-icon {
    color: #f39c12 !important;
}
.feature-card .text-muted {
    color: #6c757d !important; /* Ensure muted text is gray, not white */
}

/* Dynamic IoT Templates Section */
.iot-templates {
    background: linear-gradient(135deg, #fdf2e9 0%, #fce8d5 100%);
    padding: 4rem 0;
    color: #333 !important; /* Dark text for light bg */
}
.template-card {
    background: white !important;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s;
    cursor: pointer;
    color: #333 !important;
}
.template-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(231, 76, 60, 0.2);
}
.template-code {
    background: #f8f9fa !important;
    border-radius: 10px;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    margin-top: 1rem;
    overflow-x: auto;
    white-space: pre-wrap;
    color: #333 !important; /* Ensure code is dark */
}

/* Enhanced Tab Styles with New Colors */
.access-tabs .nav-link {
    border-radius: 15px 15px 0 0;
    font-weight: 600;
    color: #e74c3c !important;
    border: none;
    margin-right: 5px;
    padding: 12px 24px;
}
.access-tabs .nav-link.active {
    background: linear-gradient(135deg, #e74c3c 0%, #f39c12 100%);
    color: white !important;
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}
.tab-pane {
    padding: 2.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 0 15px 15px 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    color: #333 !important; /* Dark text for tab content */
}
.tab-pane .text-muted {
    color: #6c757d !important;
}
.tab-pane input,
.tab-pane label {
    color: #333 !important;
}

/* Footer Enhancements with New Colors - Fixed Visibility */
footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
    color: #fff !important; /* Force white text */
    position: relative;
}
footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><line x1="0" y1="100" x2="100" y2="0" stroke="%23ffffff" stroke-opacity="0.05"/></svg>') repeat;
    opacity: 0.3; /* Reduced for better text visibility */
}
footer * {
    color: #fff !important; /* Ensure all footer elements are white */
}
footer p,
footer h5,
footer ul {
    color: #fff !important;
}
footer a {
    color: #f39c12 !important;
    text-decoration: none;
    transition: color 0.3s;
    cursor: pointer;
}
footer a:hover {
    color: #e74c3c !important;
    text-decoration: underline;
}
footer .text-light {
    color: #fff !important;
}
footer .text-muted {
    color: #bdc3c7 !important; /* Light gray for muted in dark footer */
}

/* Student-Focused Animations */
.student-highlight {
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Stats Section */
.stats {
    background: linear-gradient(135deg, #e74c3c 0%, #f39c12 100%);
    color: white !important;
    padding: 3rem 0;
}
.stat-item {
    text-align: center;
}
.stat-number {
    font-size: 3rem;
    font-weight: bold;
    display: block;
    color: #fff !important;
}
.stat-item p {
    color: #fff !important;
}

/* Responsive Improvements */
@media (max-width: 768px) {
    .hero {
        padding: 200px 0 100px; /* Adjust for mobile */
        background-attachment: scroll;
        margin-top: 60px; /* Smaller navbar on mobile */
    }
    .feature-icon {
        font-size: 3rem;
    }
    footer {
        padding: 2rem 0 !important; /* Adjust footer padding on mobile */
    }
}

/* Plain About Section Styles - Fixed Visibility */
.about-section {
    background: #fdf2e9 !important;
    padding: 3rem 0;
    color: #333 !important; /* Dark text for light bg */
}
.about-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}
.about-content .text-muted {
    color: #6c757d !important; /* Gray muted text */
}
.about-content a {
    color: #e74c3c !important;
}

/* General Fixes for Page Contents */
.bg-light {
    background-color: #f8f9fa !important;
    color: #333 !important;
}
.text-muted {
    color: #6c757d !important;
}
.text-light {
    color: #f8f9fa !important;
}
.text-white {
    color: #fff !important;
}

/* Ensure modal content visibility */
.modal-content {
    color: #333 !important;
    background: #fff !important; /* White background for modal */
}
.modal-header {
    color: #fff !important;
}
.modal-footer .text-muted {
    color: #6c757d !important;
}

/* Navbar Visibility */
.navbar {
    background: linear-gradient(135deg, #e74c3c 0%, #f39c12 100%) !important;
    color: #fff !important;
}
.navbar a {
    color: #fff !important;
}
.navbar .btn-outline-light {
    color: #fff !important;
    border-color: #fff !important;
}

/* Fix for any overlapping */
#home {
    margin-top: 76px; /* Standard navbar height */
}