/* Cape Town MS Developer User Group - Custom Styles */

:root {
    --primary-color: #0078d4;
    --secondary-color: #005a9e;
    --accent-color: #40e0d0;
    --dark-bg: #1a1a1a;
    --light-bg: #f8f9fa;
    --text-dark: #212529;
    --text-light: #ffffff;
    --gradient-primary: linear-gradient(135deg, #0078d4 0%, #005a9e 100%);
    --gradient-accent: linear-gradient(135deg, #40e0d0 0%, #0078d4 100%);
}

/* Global Styles */
html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
}

/* Header and Navigation */
.navbar {
    background: var(--gradient-primary) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-light) !important;
}

.navbar-nav .nav-link {
    color: var(--text-light) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
}

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

/* Mobile App Navigation Hiding */
.mobile-app-view .navbar,
.mobile-app-view .navbar-expand-lg,
.mobile-app-view .navbar-dark,
.mobile-app-view .fixed-top,
.mobile-app-view nav.navbar {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

.mobile-app-view body {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.mobile-app-view .hero,
.mobile-app-view .hero-section {
    padding-top: 20px !important;
    margin-top: 0 !important;
}

.mobile-app-view .main-content {
    padding-top: 20px !important;
}

.mobile-app-view .container-fluid,
.mobile-app-view .container {
    padding-top: 0 !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(13, 110, 253, 0.7), rgba(108, 117, 125, 0.7)), url('../img/heroimage.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--text-light);
    padding: 6rem 0 5rem 0;
    text-align: center;
    margin-top: 76px; /* Account for fixed navbar */
    overflow: hidden; /* Prevent animation overflow */
    min-height: 70vh;
    width: 100%;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    line-height: 1.2;
}

.hero-section .lead {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
}

/* Page-specific Hero Sections */
.hero-section.index-hero {
    background: linear-gradient(rgba(13, 110, 253, 0.7), rgba(108, 117, 125, 0.7)), url('../img/hero/indexheroi.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.hero-section.meetups-hero {
    background: linear-gradient(rgba(13, 110, 253, 0.7), rgba(108, 117, 125, 0.7)), url('../img/hero/meetupshero.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.hero-section.contact-hero {
    background: linear-gradient(rgba(13, 110, 253, 0.7), rgba(108, 117, 125, 0.7)), url('../img/hero/contatusushero.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.hero-section.about-hero {
    background: linear-gradient(rgba(13, 110, 253, 0.7), rgba(108, 117, 125, 0.7)), url('../img/hero/aboutushero.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.hero-section.conferences-hero {
    background: linear-gradient(rgba(13, 110, 253, 0.7), rgba(108, 117, 125, 0.7)), url('../img/hero/previousconferenceshero.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.hero-section.speakers-hero {
    background: linear-gradient(rgba(13, 110, 253, 0.7), rgba(108, 117, 125, 0.7)), url('../img/hero/speakershero.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.hero-section.dotnet-conf-hero {
    background: linear-gradient(rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.8)), url('../img/hero/dark-submarine.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Buttons */
.btn-primary {
    background: var(--gradient-accent);
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 120, 212, 0.4);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 0.75rem 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: var(--gradient-primary);
    color: var(--text-light);
    font-weight: 600;
    border: none;
    padding: 1.25rem;
}

/* Event Cards */
.event-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-left: 5px solid var(--primary-color);
}

.event-date {
    background: var(--primary-color);
    color: var(--text-light);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1rem;
}

/* Sections */
.section-padding {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    position: relative;
    padding-bottom: 1rem;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-accent);
    border-radius: 2px;
}

/* Team/Speaker Cards */
.team-card {
    text-align: center;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.team-card .card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.team-card img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem auto;
    border: 4px solid var(--primary-color);
}

.team-card h5 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.team-card .position {
    color: #6c757d;
    font-style: italic;
    margin-bottom: 1rem;
}

.team-card .card-text {
    flex: 1;
    margin-bottom: 1.5rem;
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: auto;
    min-height: 3rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 0.5rem;
    color: var(--primary-color);
    font-size: 1.5rem;
    width: 2.5rem;
    height: 2.5rem;
    transition: color 0.3s ease;
}

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

/* Footer */
footer {
    background: var(--dark-bg);
    color: var(--text-light);
    padding: 3rem 0 1rem;
}

footer h5 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

footer a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--accent-color);
}

/* Sponsors Section */
.sponsors-section {
    background: var(--light-bg);
    padding: 3rem 0;
}

.sponsor-logo {
    max-height: 80px;
    width: auto;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    filter: grayscale(100%);
}

.sponsor-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
}

/* Event Countdown Overlay */
.countdown-overlay {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.9rem;
    opacity: 0.95;
    transition: opacity 0.3s ease, transform 0.3s ease;
    background: linear-gradient(135deg, rgba(128, 0, 128, 0.9) 0%, rgba(75, 0, 130, 0.9) 100%) !important;
    position: fixed;
    top: 76px; /* Default desktop navbar height */
    left: 0;
    right: 0;
    z-index: 999; /* Below navbar but above content */
}

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

/* Mobile adjustments */
@media (max-width: 991.98px) {
    .countdown-overlay {
        top: 80px; /* Extra space for hamburger menu navbar */
    }
}

.countdown-display {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.countdown-item {
    display: inline-block;
    text-align: center;
    margin: 0 0.3rem;
    padding: 0.3rem 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(5px);
    min-width: 45px;
    transition: all 0.3s ease;
    animation: pulse-subtle 3s ease-in-out infinite;
    opacity: 0.9;
    box-shadow: 0 2px 8px rgba(128, 0, 128, 0.2);
}

.countdown-item:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.25);
    opacity: 1;
    box-shadow: 0 4px 12px rgba(128, 0, 128, 0.3);
}

.countdown-number {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
    color: rgba(255, 255, 255, 0.95);
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(128, 0, 128, 0.5);
}

.countdown-label {
    display: block;
    font-size: 0.6rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 0.1rem;
}

.countdown-simple {
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    animation: pulse-subtle 3s ease-in-out infinite;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(128, 0, 128, 0.5);
}

.countdown-simple:hover {
    opacity: 1;
}

.countdown-expired {
    font-size: 1rem;
    font-weight: 600;
    color: #ffc107;
    animation: bounce 1.5s ease-in-out infinite;
    opacity: 1;
    text-shadow: 0 1px 2px rgba(128, 0, 128, 0.5);
}

/* Overlay specific adjustments */
.countdown-overlay .countdown-item {
    margin: 0 0.2rem;
    padding: 0.25rem 0.4rem;
    min-width: 40px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.countdown-overlay .countdown-item:hover {
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.countdown-overlay .countdown-number {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.95);
}

.countdown-overlay .countdown-label {
    font-size: 0.55rem;
    color: rgba(255, 255, 255, 0.75);
}

.countdown-overlay .countdown-simple {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.95);
}

/* Subtle pulse animation with purple theme */
@keyframes pulse-subtle {
    0%, 100% { 
        opacity: 0.9; 
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(128, 0, 128, 0.2);
    }
    50% { 
        opacity: 0.95; 
        transform: scale(1.01);
        box-shadow: 0 3px 10px rgba(128, 0, 128, 0.3);
    }
}

/* Bounce animation for expired events */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-3px);
    }
    60% {
        transform: translateY(-2px);
    }
}

/* Hide overlay when dismissed */
.countdown-overlay.dismissed {
    transform: translateY(-100%);
    opacity: 0;
}

/* Auto-fade animation */
.countdown-overlay.auto-fade {
    opacity: 0;
    transform: translateY(-100%);
}

/* Adjust body padding when overlay is visible */
body.countdown-overlay-visible {
    padding-top: 0; /* Remove padding that creates white space */
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .countdown-overlay {
        font-size: 0.8rem;
        opacity: 0.93;
    }
    
    .countdown-overlay:hover {
        opacity: 0.98;
    }
    
    .countdown-overlay .countdown-item {
        margin: 0 0.15rem;
        padding: 0.2rem 0.3rem;
        min-width: 35px;
    }
    
    .countdown-overlay .countdown-number {
        font-size: 1rem;
    }
    
    .countdown-overlay .countdown-label {
        font-size: 0.5rem;
    }
    
    .countdown-overlay .countdown-simple {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .countdown-overlay {
        font-size: 0.75rem;
        padding: 0;
        opacity: 0.9;
    }
    
    .countdown-overlay .countdown-item {
        margin: 0 0.1rem;
        padding: 0.15rem 0.25rem;
        min-width: 30px;
        background: rgba(255, 255, 255, 0.08);
        opacity: 0.8;
    }
    
    .countdown-overlay .countdown-number {
        font-size: 0.9rem;
    }
    
    .countdown-overlay .countdown-label {
        font-size: 0.45rem;
    }
    
    .countdown-overlay .countdown-simple {
        font-size: 0.8rem;
        opacity: 0.8;
    }
    
    body.countdown-overlay-visible {
        padding-top: 0;
    }
}

@media (max-width: 400px) {
    .countdown-overlay {
        font-size: 0.7rem;
        padding: 0;
    }
    
    .countdown-overlay .countdown-item {
        margin: 0 0.08rem;
        padding: 0.12rem 0.2rem;
        min-width: 28px;
    }
    
    .countdown-overlay .countdown-number {
        font-size: 0.85rem;
    }
    
    .countdown-overlay .countdown-label {
        font-size: 0.4rem;
    }
    
    .countdown-overlay .countdown-simple {
        font-size: 0.75rem;
    }
    
    body.countdown-overlay-visible {
        padding-top: 0;
    }
}

@media (max-width: 360px) {
    .countdown-overlay {
        font-size: 0.65rem;
        padding: 0;
    }
    
    .countdown-overlay .countdown-item {
        margin: 0 0.06rem;
        padding: 0.1rem 0.18rem;
        min-width: 26px;
    }
    
    .countdown-overlay .countdown-number {
        font-size: 0.8rem;
    }
    
    .countdown-overlay .countdown-label {
        font-size: 0.38rem;
    }
    
    .countdown-overlay .countdown-simple {
        font-size: 0.7rem;
    }
    
    body.countdown-overlay-visible {
        padding-top: 0;
    }
}

@media (max-width: 480px) {
    .countdown-overlay {
        font-size: 0.75rem;
        padding: 0;
        opacity: 0.9;
    }
    
    .countdown-overlay .countdown-item {
        margin: 0 0.1rem;
        padding: 0.15rem 0.25rem;
        min-width: 30px;
        background: rgba(255, 255, 255, 0.08);
        opacity: 0.8;
    }
    
    .countdown-overlay .countdown-number {
        font-size: 0.9rem;
    }
    
    .countdown-overlay .countdown-label {
        font-size: 0.45rem;
    }
    
    .countdown-overlay .countdown-simple {
        font-size: 0.8rem;
        opacity: 0.8;
    }
    
    body.countdown-overlay-visible {
        padding-top: 0;
    }
}

/* Medium screens */
@media (max-width: 1024px) and (min-width: 769px) {
    .hero-section {
        background-size: cover;
        background-attachment: scroll; /* Better performance on tablets */
        min-height: 60vh;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 5rem 0 4rem 0;
        background-size: cover;
        background-attachment: scroll; /* Better performance on mobile */
        min-height: 50vh;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
        line-height: 1.3;
    }
    
    .hero-section .lead {
        font-size: 1.2rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .btn-primary,
    .btn-outline-primary {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 1s ease-in;
}

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

.slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Contact Form */
.contact-form {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 0.75rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 120, 212, 0.25);
}
