/* ==========================================
   The Campus Expert - Main Stylesheet
   ========================================== */

/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1e88e5;
    --secondary-color: #43a047;
    --accent-color: #fb8c00;
    --dark-color: #263238;
    --light-color: #f5f5f5;
    --white: #ffffff;
    --text-color: #333333;
    --text-light: #666666;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 20px rgba(0,0,0,0.15);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Mobile touch optimization */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Ensure smooth scrolling */
html {
    scroll-behavior: smooth;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.site-header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
}

.logo a {
    display: block;
    line-height: 0;
}

.logo-image {
    height: 50px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo-image:hover {
    transform: scale(1.05);
}

/* Legacy text logo styles (fallback) */
.logo span {
    color: var(--secondary-color);
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-nav a {
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-decoration: none;
    min-height: 44px; /* Minimum touch target size */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #1565c0;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: #2e7d32;
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-link {
    color: var(--primary-color);
    font-weight: 600;
}

.btn-link:hover {
    color: #1565c0;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    padding: 4rem 0;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.hero-image img {
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Mission Section */
.mission {
    padding: 4rem 0;
    background-color: var(--light-color);
}

.mission-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: center;
}

.mission-image {
    width: 100%;
    border-radius: 10px;
}

.mission-text h2 {
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.mission-text p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

/* How It Works Section */
.how-it-works {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background-color: var(--light-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon img {
    width: 50px;
    height: 50px;
}

.feature-card h3 {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.feature-link {
    color: var(--primary-color);
    font-weight: 600;
}

.feature-link:hover {
    color: #1565c0;
}

/* Testimonials Section */
.testimonials {
    padding: 4rem 0;
    background-color: var(--light-color);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.testimonial-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.testimonial-image {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    overflow: hidden;
}

.testimonial-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-content p {
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 1rem;
}

.student-name {
    font-weight: 600;
    color: var(--text-color);
    font-style: normal !important;
}

/* Volunteer CTA Section */
.volunteer-cta {
    padding: 4rem 0;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: var(--white);
}

.volunteer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.volunteer-text h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.volunteer-text h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.volunteer-text p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.volunteer-image img {
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Get Involved Section */
.get-involved {
    padding: 4rem 0;
}

.involvement-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.involvement-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease;
}

.involvement-card:hover {
    transform: translateY(-5px);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.involvement-card h3 {
    font-size: 1.3rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.involvement-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* Subjects Section */
.subjects-section {
    padding: 4rem 0;
    background-color: var(--light-color);
}

.subjects-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.subject-column h3 {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--primary-color);
}

.subject-column ul {
    list-style: none;
}

.subject-column li {
    padding: 0.5rem 0;
}

.subject-column a {
    color: var(--text-color);
    transition: color 0.3s;
}

.subject-column a:hover {
    color: var(--primary-color);
}

/* Footer Styles */
.site-footer {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    padding: 0.3rem 0;
}

.footer-section a {
    color: rgba(255,255,255,0.8);
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--white);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.social-links a:hover {
    background-color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
    font-family: inherit;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

/* Better mobile input styling */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
select,
textarea {
    font-size: 16px; /* Prevents zoom on iOS */
}

textarea.form-control {
    resize: vertical;
    min-height: 150px;
}

.form-message {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Content Pages */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    padding: 3rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.page-content {
    padding: 4rem 0;
}

.content-section {
    margin-bottom: 3rem;
}

.content-section h2 {
    font-size: 2rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.content-section p {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* Mobile Utility Classes */
.mobile-only {
    display: none;
}

.desktop-only {
    display: block;
}

/* Prevent text selection on buttons/interactive elements */
button, .btn, a.btn {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

/* Better scrollbars on mobile */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-color);
}

::-webkit-scrollbar-thumb {
    background: var(--text-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-color);
}

/* Improve image loading */
img {
    max-width: 100%;
    height: auto;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Responsive embedded content */
iframe,
embed,
object,
video {
    max-width: 100%;
    height: auto;
}

/* Responsive tables */
table {
    width: 100%;
    border-collapse: collapse;
}

@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Better focus states for accessibility */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Responsive Design */

/* Large Tablets & Small Desktops (992px and down) */
@media (max-width: 992px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-content,
    .mission-content,
    .volunteer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero-text, .mission-text, .volunteer-text {
        text-align: center;
    }
    
    .hero-image, .mission-image, .volunteer-image {
        order: -1;
    }
    
    .features-grid,
    .testimonials-grid,
    .subjects-columns {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .involvement-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .page-header h1 {
        font-size: 2.5rem;
    }
}

/* Tablets (768px and down) */
@media (max-width: 768px) {
    /* Utility classes */
    .mobile-only {
        display: block;
    }
    
    .desktop-only {
        display: none;
    }
    
    /* Logo sizing for mobile */
    .logo-image {
        height: 45px;
    }
    
    /* Navigation */
    .header-content {
        flex-wrap: wrap;
    }
    
    .main-nav {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--white);
        box-shadow: var(--shadow);
        transition: left 0.3s ease;
        z-index: 999;
        overflow-y: auto;
    }
    
    .main-nav.active {
        left: 0;
    }
    
    .main-nav ul {
        flex-direction: column;
        padding: 2rem;
        gap: 0;
    }
    
    .main-nav li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }
    
    .main-nav a {
        display: block;
        padding: 1rem;
        font-size: 1.1rem;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .header-actions {
        gap: 0.5rem;
    }
    
    .header-actions .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Hero Section */
    .hero {
        padding: 2rem 0;
    }
    
    .hero-text h1 {
        font-size: 2rem;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    /* Grids */
    .features-grid,
    .testimonials-grid,
    .involvement-grid,
    .subjects-columns,
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature-card,
    .testimonial-card,
    .involvement-card {
        padding: 1.5rem;
    }
    
    /* Sections */
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }
    
    .page-header {
        padding: 2rem 0;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-content {
        padding: 2rem 0;
    }
    
    .content-section {
        margin-bottom: 2rem;
    }
    
    .content-section h2 {
        font-size: 1.5rem;
    }
    
    .content-section p {
        font-size: 1rem;
    }
    
    /* Mission Section */
    .mission,
    .volunteer-cta {
        padding: 2rem 0;
    }
    
    .mission-content,
    .volunteer-content {
        gap: 1.5rem;
    }
    
    .mission-text h2,
    .volunteer-text h2 {
        font-size: 1.8rem;
    }
    
    /* Footer */
    .site-footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-section h3 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    /* Forms */
    form {
        padding: 0;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    /* Tables and overflow content */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Mobile Phones (576px and down) */
@media (max-width: 576px) {
    /* Container */
    .container {
        padding: 0 10px;
    }
    
    /* Logo */
    .logo {
        font-size: 1.2rem;
    }
    
    /* Hero */
    .hero-text h1 {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
        padding: 0.75rem;
    }
    
    .btn {
        width: 100%;
        padding: 0.7rem 1rem;
        font-size: 0.95rem;
    }
    
    /* Headers */
    .page-header h1 {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    .page-header p {
        font-size: 0.95rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    /* Cards */
    .feature-card,
    .testimonial-card,
    .involvement-card {
        padding: 1.25rem;
    }
    
    .feature-card h3,
    .testimonial-card h3,
    .involvement-card h3 {
        font-size: 1.2rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 1rem;
    }
    
    .feature-icon img {
        width: 40px;
        height: 40px;
    }
    
    .card-icon {
        font-size: 2.5rem;
    }
    
    /* Content */
    .content-section h2 {
        font-size: 1.3rem;
    }
    
    .content-section h3 {
        font-size: 1.1rem;
    }
    
    .content-section p,
    .content-section ul,
    .content-section li {
        font-size: 0.95rem;
    }
    
    /* Mission & Volunteer */
    .mission-text h2,
    .volunteer-text h2 {
        font-size: 1.5rem;
    }
    
    .mission-text h3,
    .volunteer-text h3 {
        font-size: 1.2rem;
    }
    
    .mission-text p,
    .volunteer-text p {
        font-size: 0.95rem;
    }
    
    /* Footer */
    .footer-section {
        margin-bottom: 1.5rem;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .social-links a {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
    
    /* Forms */
    .form-control {
        font-size: 1rem;
        padding: 0.6rem;
    }
    
    textarea.form-control {
        min-height: 120px;
    }
    
    /* Navigation adjustments */
    .main-nav ul {
        padding: 1rem;
    }
    
    .main-nav a {
        padding: 0.75rem;
        font-size: 1rem;
    }
    
    /* Header actions on very small screens */
    .header-actions .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    /* Reduce spacing */
    .hero,
    .how-it-works,
    .testimonials,
    .get-involved,
    .subjects-section {
        padding: 1.5rem 0;
    }
    
    .mission,
    .volunteer-cta {
        padding: 1.5rem 0;
    }
    
    /* Subject columns */
    .subject-column h3 {
        font-size: 1.2rem;
    }
    
    .subject-column li {
        padding: 0.4rem 0;
        font-size: 0.9rem;
    }
}

/* Extra Small Phones (400px and down) */
@media (max-width: 400px) {
    .logo-image {
        height: 40px;
    }
    
    .hero-text h1 {
        font-size: 1.3rem;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .feature-card,
    .testimonial-card,
    .involvement-card {
        padding: 1rem;
    }
    
    .header-actions {
        flex-wrap: wrap;
    }
    
    .mobile-menu-toggle {
        order: 3;
        width: 100%;
        text-align: right;
        padding-top: 0.5rem;
    }
}

/* Landscape mode for mobile devices */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 1rem 0;
    }
    
    .page-header {
        padding: 1rem 0;
    }
    
    .main-nav {
        height: 100vh;
        overflow-y: auto;
    }
}

/* Print styles */
@media print {
    .site-header,
    .site-footer,
    .hero-buttons,
    .btn,
    .mobile-menu-toggle,
    .social-links {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
    }
    
    .container {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
}
