/* Custom CSS for M&G Communication - Art & Science School */

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #e0e7ff;
    --secondary-color: #8b5cf6;
    --accent-color: #f59e0b;
    --accent-light: #fef3c7;
    --success-color: #10b981;
    --success-light: #d1fae5;
    --info-color: #06b6d4;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --border-radius: 1rem;
    --border-radius-lg: 1.5rem;
}

/* Global Styles */
body {
    font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Fredoka', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-warning {
    color: var(--accent-color) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.bg-warning {
    background-color: var(--accent-color) !important;
}

.bg-success {
    background-color: var(--success-color) !important;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    font-family: 'Fredoka', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-warning {
    background: linear-gradient(135deg, var(--accent-color) 0%, #d97706 100%);
    border: none;
    color: white;
    box-shadow: var(--shadow);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    border: none;
    box-shadow: var(--shadow);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--primary-light) 100%);
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23e0e7ff" opacity="0.3"/><circle cx="75" cy="75" r="1" fill="%23e0e7ff" opacity="0.3"/><circle cx="50" cy="10" r="0.5" fill="%23e0e7ff" opacity="0.2"/><circle cx="10" cy="60" r="0.5" fill="%23e0e7ff" opacity="0.2"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    color: var(--primary-color);
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-features .feature-item {
    background: rgba(255, 255, 255, 0.8);
    padding: 1rem;
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item h3 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-item p {
    font-size: 0.9rem;
    margin: 0;
    font-weight: 500;
}

/* Contact Form Cards */
.contact-form-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 2;
}

.contact-form-card h3 {
    color: var(--primary-color);
    font-family: 'Fredoka', sans-serif;
}

.contact-form-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color), var(--success-color));
    border-radius: var(--border-radius-lg);
    z-index: -1;
    opacity: 0.3;
}

/* Activity Cards */
.activity-card .card {
    transition: all 0.4s ease;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    border: none;
}

.activity-card .card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.activity-icon {
    position: relative;
}

.activity-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
}

.activity-tags .badge {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 1rem;
    font-weight: 500;
}

/* Speaker Cards */
.speaker-card .card {
    border-radius: var(--border-radius-lg);
    transition: all 0.3s ease;
    border: none;
}

.speaker-card .card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.speaker-avatar {
    position: relative;
}

.speaker-avatar::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--accent-light) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
}

.speaker-flags .badge {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
}

/* Program Cards */
.program-card .card {
    border-radius: var(--border-radius-lg);
    transition: all 0.4s ease;
    border: none;
    overflow: hidden;
}

.program-card .card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.program-card .card-header {
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0 !important;
    position: relative;
}

.program-card .card-header .badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.7rem;
    padding: 0.4rem 0.8rem;
    border-radius: 1rem;
}

/* Gallery Items */
.gallery-item .card {
    border-radius: var(--border-radius-lg);
    transition: all 0.3s ease;
    border: none;
}

.gallery-item .card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.gallery-placeholder {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: var(--border-radius);
}

/* Contact Section */
.contact-item {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
}

.contact-item i {
    font-size: 1.2rem;
    min-width: 20px;
    margin-right: 1rem;
}

.contact-features .feature-item {
    transition: all 0.3s ease;
}

.contact-features .feature-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Sticky Bottom Bar */
.sticky-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

/* Social Links */
.social-links a {
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.social-links a:hover {
    opacity: 0.8;
    transform: scale(1.2) rotate(5deg);
}

/* Form Controls */
.form-control {
    border-radius: var(--border-radius);
    border: 2px solid #e5e7eb;
    padding: 0.875rem 1rem;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
    transform: translateY(-1px);
}

.form-control:focus::placeholder {
    color: var(--primary-color);
}

/* Navigation */
.navbar-brand {
    font-size: 1.5rem;
    font-family: 'Fredoka', sans-serif;
}

.nav-link {
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 1rem !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

.nav-link:hover {
    color: var(--primary-color) !important;
    transform: translateY(-1px);
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .hero-section h1 {
        font-size: 3rem;
    }
    
    .display-5 {
        font-size: 3.5rem;
    }
    
    .activity-icon i,
    .speaker-avatar i {
        font-size: 4rem !important;
    }
}

@media (max-width: 992px) {
    .hero-section {
        min-height: auto;
        padding: 4rem 0;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .display-5 {
        font-size: 3rem;
    }
    
    .contact-form-card {
        margin-top: 2rem;
    }
    
    .navbar-nav {
        text-align: center;
        margin-top: 1rem;
    }
    
    .nav-link {
        padding: 0.75rem 1rem !important;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    .hero-stats .row {
        margin-top: 2rem;
    }
    
    .stat-item h3 {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding: 3rem 0;
    }
    
    .hero-section h1 {
        font-size: 2.2rem;
        text-align: center;
    }
    
    .hero-section .lead {
        text-align: center;
    }
    
    .hero-features {
        margin-bottom: 2rem;
    }
    
    .hero-features .row {
        justify-content: center;
    }
    
    .hero-features .col-6 {
        flex: 0 0 auto;
        width: 45%;
        margin: 0.5rem;
    }
    
    .stat-item h3 {
        font-size: 2rem;
    }
    
    .contact-form-card {
        margin-top: 2rem;
        padding: 1.5rem;
    }
    
    .sticky-bottom-bar {
        position: relative;
        margin-top: 2rem;
    }
    
    .activity-card .card:hover {
        transform: translateY(-4px);
    }
    
    .speaker-card .col-md-6 {
        margin-bottom: 1rem;
    }
    
    .program-card .col-md-6 {
        margin-bottom: 1rem;
    }
    
    .gallery-item .col-md-6 {
        margin-bottom: 1rem;
    }
    
    .contact-info .contact-item {
        text-align: center;
        flex-direction: column;
    }
    
    .contact-info .contact-item i {
        margin-bottom: 0.5rem;
        margin-right: 0;
    }
    
    .contact-features .row {
        justify-content: center;
    }
    
    .contact-features .col-6 {
        flex: 0 0 auto;
        width: 45%;
        margin: 0.5rem;
    }
    
    .top-bar .col-md-6 {
        text-align: center;
        margin-bottom: 0.5rem;
    }
    
    .top-bar .col-md-6:last-child {
        margin-bottom: 0;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer .col-md-6 {
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .footer .col-md-6:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .display-5 {
        font-size: 2.2rem;
    }
    
    .display-6 {
        font-size: 2rem;
    }
    
    .contact-form-card {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .activity-icon i,
    .speaker-avatar i {
        font-size: 3rem !important;
    }
    
    .hero-features .col-6 {
        width: 100%;
        margin: 0.5rem 0;
    }
    
    .hero-stats .col-4 {
        margin-bottom: 1rem;
    }
    
    .stat-item h3 {
        font-size: 1.8rem;
    }
    
    .activity-card,
    .speaker-card,
    .program-card,
    .gallery-item {
        margin-bottom: 1rem;
    }
    
    .contact-features .col-6 {
        width: 100%;
        margin: 0.5rem 0;
    }
    
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .form-control {
        padding: 0.75rem 0.875rem;
        font-size: 0.9rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .top-bar {
        padding: 1rem 0;
    }
    
    .top-bar .d-flex {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .sticky-bottom-bar .row {
        text-align: center;
    }
    
    .sticky-bottom-bar .col-md-8,
    .sticky-bottom-bar .col-md-4 {
        margin-bottom: 0.5rem;
    }
    
    .sticky-bottom-bar .d-flex {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 1.6rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .display-6 {
        font-size: 1.8rem;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .contact-form-card {
        padding: 0.75rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .form-control {
        padding: 0.6rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    .activity-icon i,
    .speaker-avatar i {
        font-size: 2.5rem !important;
    }
    
    .stat-item h3 {
        font-size: 1.6rem;
    }
}

/* Landscape orientation fixes for mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 1.8rem;
    }
    
    .contact-form-card {
        padding: 1rem;
    }
    
    .sticky-bottom-bar {
        position: relative;
        margin-top: 1rem;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .activity-icon i,
    .speaker-avatar i {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Print styles */
@media print {
    .sticky-bottom-bar,
    .navbar,
    .top-bar {
        display: none !important;
    }
    
    .hero-section {
        min-height: auto;
        background: white !important;
    }
    
    .card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }
    
    .btn {
        border: 1px solid #ddd !important;
        background: white !important;
        color: black !important;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Loading States */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Success/Error Messages */
.alert {
    border-radius: var(--border-radius);
    border: none;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg, var(--success-light) 0%, #a7f3d0 100%);
    color: #065f46;
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border-left: 4px solid var(--danger-color);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-dark), #d97706);
}

/* Fun Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.activity-icon i,
.speaker-avatar i {
    animation: float 3s ease-in-out infinite;
}

.hero-features .feature-item:hover {
    animation: pulse 0.6s ease-in-out;
}

/* Gradient Text Effects */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color), var(--success-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Learning Programs Section - Responsive Fixes */
.program-card {
    transition: all 0.3s ease;
}

.program-card .card {
    max-width: 100%;
    min-height: 400px;
}

/* Ensure cards don't stretch too wide on large screens */
@media (min-width: 1200px) {
    .program-card .card {
        max-width: 320px;
        margin: 0 auto;
    }
    
    .program-card .card-body {
        padding: 1.5rem;
    }
    
    .program-card .card-header {
        padding: 1.5rem 1rem;
    }
}

@media (min-width: 1400px) {
    .program-card .card {
        max-width: 350px;
    }
}

@media (min-width: 1600px) {
    .program-card .card {
        max-width: 380px;
    }
}

/* Ensure proper spacing on medium screens */
@media (max-width: 1199px) and (min-width: 992px) {
    .program-card .card {
        max-width: 100%;
    }
    
    .program-card .card-body {
        padding: 1.25rem;
    }
}

/* Mobile optimizations */
@media (max-width: 767px) {
    .program-card .card {
        min-height: 350px;
    }
    
    .program-card .card-body {
        padding: 1rem;
    }
    
    .program-card .card-header {
        padding: 1rem 0.75rem;
    }
}

/* Fix for the specific pricing display issue */
.program-card .display-6 {
    font-size: 2.5rem;
    line-height: 1.2;
}

@media (max-width: 576px) {
    .program-card .display-6 {
        font-size: 2rem;
    }
}

/* Ensure the row centers properly on all screen sizes */
.programs-section .row {
    justify-content: center;
    align-items: stretch;
}

/* Add some breathing room between cards on very wide screens */
@media (min-width: 1400px) {
    .programs-section .row {
        gap: 2rem;
    }
}
