/**
 * Qadriya Charitable Foundation - Custom CSS
 * Premium NGO Website Styles
 */

:root {
    --primary-color: #1e3c72;
    --secondary-color: #2a5298;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --text-color: #333;
    --light-color: #f8f9fa;
    --dark-color: #2c3e50;
    --gradient: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    --gradient-green: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

/* Top Bar */
.top-bar {
    background: var(--dark-color);
    color: white;
    padding: 10px 0;
    font-size: 14px;
}

.top-bar-left a {
    color: white;
    margin-right: 20px;
}

.top-bar-left a:hover {
    color: var(--accent-color);
}

.top-bar-right {
    text-align: right;
}

.top-bar-right a {
    color: white;
    margin-left: 15px;
    font-size: 16px;
}

.top-bar-right a:hover {
    color: var(--accent-color);
}

/* Navigation */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 15px 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 24px;
    color: var(--primary-color) !important;
}

.navbar-brand i {
    color: var(--accent-color);
}

.nav-link {
    color: var(--text-color) !important;
    font-weight: 500;
    padding: 10px 15px !important;
}

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

.btn-donate {
    background: var(--accent-color);
    color: white !important;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 600;
    margin-left: 15px;
}

.btn-donate:hover {
    background: #c0392b;
    color: white !important;
}

/* Hero Section */
.hero-section {
    background: var(--gradient);
    color: white;
    padding: 100px 0;
    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"><circle cx="50" cy="50" r="40" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: 200px;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
    100% { transform: translateY(0) rotate(360deg); }
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.btn-hero {
    background: white;
    color: var(--primary-color);
    padding: 15px 35px;
    border-radius: 25px;
    font-weight: 600;
    display: inline-block;
}

.btn-hero:hover {
    background: var(--accent-color);
    color: white;
}

/* Section Styles */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.section-title p {
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

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

.card:hover {
    transform: translateY(-10px);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

.card-body {
    padding: 25px;
}

.card-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.card-text {
    color: #666;
    margin-bottom: 20px;
}

/* Program Cards */
.program-card {
    height: 100%;
}

.program-card .progress {
    height: 10px;
    border-radius: 5px;
    margin-top: 15px;
}

.program-card .raised-amount {
    font-weight: 700;
    color: var(--success-color);
    font-size: 18px;
}

/* Testimonial Cards */
.testimonial-card {
    text-align: center;
    padding: 30px;
}

.testimonial-card img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
}

.testimonial-card .stars {
    color: var(--warning-color);
    margin-bottom: 15px;
}

.testimonial-card .quote {
    font-style: italic;
    color: #666;
    margin-bottom: 20px;
}

/* Footer */
.site-footer {
    background: var(--dark-color);
    color: white;
    padding: 60px 0 0 0;
}

.footer-about h3 {
    font-size: 24px;
    margin-bottom: 20px;
}

.footer-about p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 15px;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    color: white;
    text-align: center;
    line-height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    transition: all 0.3s ease;
}

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

.footer-links h4,
.footer-contact h4,
.footer-newsletter h4 {
    font-size: 18px;
    margin-bottom: 20px;
    color: white;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255,255,255,0.8);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.footer-contact ul {
    list-style: none;
}

.footer-contact ul li {
    margin-bottom: 15px;
    color: rgba(255,255,255,0.8);
}

.footer-contact i {
    margin-right: 10px;
    color: var(--accent-color);
}

.newsletter-form .input-group {
    margin-top: 15px;
}

.footer-bottom {
    background: rgba(0,0,0,0.3);
    padding: 20px 0;
    margin-top: 40px;
}

.footer-bottom-links {
    list-style: none;
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0;
}

.footer-bottom-links li {
    margin-left: 20px;
}

.footer-bottom-links a {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    text-align: center;
    line-height: 60px;
    font-size: 30px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background: #128c7e;
    color: white;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    text-align: center;
    line-height: 50px;
    border: none;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    transition: all 0.3s ease;
}

.back-to-top.show {
    opacity: 1;
}

/* Form Styles */
.form-control {
    border-radius: 10px;
    padding: 12px 15px;
    border: 1px solid #ddd;
}

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

.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
}

.btn-primary:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* Team Section Styles */
.team-section {
    margin-top: 40px;
}

.team-card {
    background: white;
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid #eee;
}

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

.team-image-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 20px;
}

.team-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #D4AF37; /* Gold border */
    padding: 3px;
    background: white;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
}

.team-card:hover .team-image {
    border-color: #B8962E;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5);
}

.team-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.9), rgba(184, 150, 46, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    padding: 15px;
}

.team-card:hover .team-overlay {
    opacity: 1;
}

.team-social {
    text-align: center;
    padding: 10px;
}

.team-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.team-card:hover .team-name {
    color: #B8962E;
}

.team-role {
    font-size: 14px;
    font-weight: 500;
    color: #D4AF37; /* Gold color */
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Responsive Team Section */
@media (max-width: 991px) {
    .team-image-wrapper {
        width: 160px;
        height: 160px;
    }
    
    .team-name {
        font-size: 16px;
    }
    
    .team-role {
        font-size: 13px;
    }
}

@media (max-width: 767px) {
    .team-image-wrapper {
        width: 140px;
        height: 140px;
    }
    
    .team-name {
        font-size: 14px;
    }
    
    .team-role {
        font-size: 12px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 32px;
    }
    
    .top-bar {
        display: none;
    }
    
    .footer-bottom-links {
        justify-content: center;
        margin-top: 15px;
    }
}

/* ========================================
   COMPREHENSIVE MOBILE RESPONSIVENESS
   ======================================== */

/* Mobile - 480px and below */
@media (max-width: 480px) {
    /* Typography */
    body {
        font-size: 14px;
    }
    
    h1 {
        font-size: 24px !important;
    }
    
    h2 {
        font-size: 20px !important;
    }
    
    h3 {
        font-size: 18px !important;
    }
    
    h4 {
        font-size: 16px !important;
    }
    
    /* Header & Navigation */
    .navbar-brand img {
        width: 35px !important;
        height: 35px !important;
    }
    
    .navbar-brand {
        font-size: 16px !important;
    }
    
    .navbar-collapse {
        background: white;
        padding: 20px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        margin-top: 10px;
    }
    
    .nav-link {
        font-size: 14px !important;
        padding: 10px 0 !important;
    }
    
    .btn-donate {
        padding: 8px 16px !important;
        font-size: 14px !important;
    }
    
    /* Hero Section */
    .hero-content h1 {
        font-size: 28px !important;
        line-height: 1.3;
    }
    
    .hero-content p {
        font-size: 14px;
    }
    
    .hero-section {
        padding: 60px 0 !important;
    }
    
    .hero-section .container {
        padding: 0 15px;
    }
    
    /* Buttons */
    .btn, button, input[type="submit"] {
        font-size: 14px !important;
        padding: 10px 16px !important;
        min-height: 44px !important; /* Touch target size */
        touch-action: manipulation;
    }
    
    .btn-hero {
        padding: 12px 20px !important;
        font-size: 16px !important;
    }
    
    /* Forms */
    .form-control {
        font-size: 16px !important; /* Prevents iOS zoom */
        padding: 12px !important;
        min-height: 44px !important; /* Touch target size */
    }
    
    .form-select {
        font-size: 16px !important;
        padding: 12px !important;
        min-height: 44px !important;
    }
    
    /* Cards */
    .card {
        margin-bottom: 15px;
    }
    
    .card-body {
        padding: 15px !important;
    }
    
    /* Donation Form */
    #donor-form-section, #payment-section, #verification-section {
        padding: 15px;
    }
    
    .qr-container {
        padding: 15px;
        margin: 10px auto;
    }
    
    #payment-qr {
        width: 200px !important;
        height: 200px !important;
    }
    
    .payment-done-btn {
        padding: 15px 20px !important;
        font-size: 16px !important;
        width: 100% !important;
    }
    
    /* Tables */
    .table-responsive {
        font-size: 12px;
    }
    
    .table {
        white-space: nowrap;
    }
    
    /* Admin Panel */
    .sidebar {
        position: fixed;
        left: -250px;
        width: 250px;
        height: 100%;
        z-index: 1000;
        transition: left 0.3s ease;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
    
    .card-header h5 {
        font-size: 16px !important;
    }
    
    /* Footer */
    .site-footer {
        padding: 40px 0 20px !important;
    }
    
    .footer-about img {
        width: 50px !important;
        height: 50px !important;
    }
    
    .footer-links h4,
    .footer-contact h4,
    .footer-newsletter h4 {
        font-size: 16px !important;
        margin-bottom: 15px !important;
    }
    
    .footer-links ul li,
    .footer-contact ul li {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .footer-bottom {
        padding: 15px 0;
    }
    
    .footer-bottom-links {
        flex-direction: column;
        gap: 10px;
    }
    
    /* Newsletter */
    .newsletter-form input {
        font-size: 16px !important;
    }
    
    .newsletter-form button {
        min-height: 44px !important;
    }
    
    /* Social Links */
    .social-links a {
        font-size: 18px;
        padding: 8px;
    }
    
    /* WhatsApp Button */
    .whatsapp-float {
        width: 50px !important;
        height: 50px !important;
        font-size: 24px !important;
        bottom: 20px !important;
        right: 15px !important;
    }
    
    /* Back to Top */
    .back-to-top {
        width: 45px !important;
        height: 45px !important;
        font-size: 18px !important;
        bottom: 80px !important;
        right: 15px !important;
    }
    
    /* Sections */
    .section {
        padding: 40px 0 !important;
    }
    
    .container {
        padding: 0 15px;
    }
    
    /* Grid Systems */
    .row > [class*="col-"] {
        padding: 5px;
    }
    
    /* Images */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Modal */
    .modal-dialog {
        margin: 10px;
    }
    
    .modal-body {
        padding: 15px !important;
    }
    
    /* Alerts */
    .alert {
        font-size: 14px;
        padding: 12px !important;
    }
    
    /* Badges */
    .badge {
        font-size: 11px;
        padding: 5px 8px;
    }
    
    /* Progress */
    .progress {
        height: 20px;
    }
}

/* Tablet - 481px to 768px */
@media (min-width: 481px) and (max-width: 768px) {
    /* Typography */
    body {
        font-size: 15px;
    }
    
    h1 {
        font-size: 28px !important;
    }
    
    h2 {
        font-size: 24px !important;
    }
    
    /* Header */
    .navbar-brand img {
        width: 40px !important;
        height: 40px !important;
    }
    
    /* Hero Section */
    .hero-content h1 {
        font-size: 32px !important;
    }
    
    /* Donation Form */
    #payment-qr {
        width: 220px !important;
        height: 220px !important;
    }
    
    /* Admin Panel */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* Sections */
    .section {
        padding: 50px 0 !important;
    }
}

/* Mobile Touch Optimizations */
@media (max-width: 768px) {
    /* Improve touch targets */
    button,
    a,
    input,
    select,
    textarea {
        touch-action: manipulation;
    }
    
    /* Prevent text selection on buttons */
    .btn, button {
        user-select: none;
        -webkit-user-select: none;
    }
    
    /* Better spacing for touch */
    .btn, button {
        margin: 5px;
    }
    
    /* Improved tap highlighting */
    * {
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Remove hover effects on touch devices */
    @media (hover: none) {
        a:hover {
            color: inherit;
        }
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        padding: 40px 0 !important;
    }
    
    .hero-content h1 {
        font-size: 22px !important;
    }
    
    .section {
        padding: 30px 0 !important;
    }
}

/* Small Phones */
@media (max-width: 360px) {
    body {
        font-size: 13px;
    }
    
    h1 {
        font-size: 20px !important;
    }
    
    h2 {
        font-size: 18px !important;
    }
    
    .navbar-brand {
        font-size: 14px !important;
    }
    
    .btn {
        padding: 8px 12px !important;
        font-size: 13px !important;
    }
    
    .form-control {
        padding: 10px !important;
    }
}

/* Additional Mobile Improvements */
@media (max-width: 768px) {
    /* Hero Section Buttons */
    .btn-hero {
        display: block;
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
    }
    
    .btn-hero + .btn-hero {
        margin-left: 0 !important;
    }
    
    /* Statistics Section */
    .stats-grid {
        gap: 15px;
    }
    
    /* Team Cards */
    .team-card {
        margin-bottom: 20px;
    }
    
    /* Table Scrolling */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* iOS Specific Fixes */
@supports (-webkit-touch-callout: none) {
    /* iOS Safari */
    .form-control {
        font-size: 16px !important; /* Prevents zoom on focus */
    }
    
    .form-select {
        font-size: 16px !important;
    }
    
    textarea {
        font-size: 16px !important;
    }
}

/* Android Specific Fixes */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    select {
        appearance: none;
        background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
        background-repeat: no-repeat;
        background-position: right 10px center;
        background-size: 12px;
    }
}