/**
 * Main Application Styles
 * Responsive design for the LetMeTryAI home page
 */

/* ==========================================================================
   Base Styles
   ========================================================================== */

body {
    font-family: 'Arial', 'Helvetica', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    line-height: 1.6;
    color: #333;
}

* {
    box-sizing: border-box;
}

/* ==========================================================================
   Header Styles
   ========================================================================== */

header {
    background-color: #4CAF50;
    color: white;
    padding: 1em 0;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header h1 {
    margin: 0;
    font-size: 2em;
    font-weight: 300;
}

header h1 small {
    font-size: 0.6em;
    opacity: 0.8;
}

/* ==========================================================================
   Main Content Layout
   ========================================================================== */

main {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    padding: 2em 1em;
    max-width: 1200px;
    margin: 0 auto;
}

/* ==========================================================================
   Section Components
   ========================================================================== */

.section {
    text-align: center;
    width: 100%;
    margin: 1em 0;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.section:hover::before {
    left: 100%;
}

.section:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.section a {
    text-decoration: none;
    color: #333;
    display: block;
    padding: 1.5em;
    transition: color 0.3s ease;
}

.section a:hover {
    color: #4CAF50;
}

/* ==========================================================================
   Image Styles
   ========================================================================== */

.responsive-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
    transition: transform 0.3s ease;
}

.section:hover .responsive-img {
    transform: scale(1.05);
}

/* ==========================================================================
   Typography
   ========================================================================== */

.section h2 {
    margin: 0.5em 0;
    font-size: 1.4em;
    font-weight: 500;
    color: #333;
}

/* ==========================================================================
   Footer Styles
   ========================================================================== */

footer {
    text-align: center;
    padding: 2em 1em;
    background-color: #4CAF50;
    color: white;
    margin-top: 2em;
}

footer p {
    margin: 0.5em 0;
}

footer a {
    color: white;
    text-decoration: none;
    margin: 0 0.5em;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

footer a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Tablet and larger screens */
@media (min-width: 768px) {
    .section {
        width: calc(50% - 1em);
    }
    
    .responsive-img {
        height: 180px;
    }
}

/* Desktop screens */
@media (min-width: 1024px) {
    .section {
        width: calc(33.333% - 1em);
    }
    
    .responsive-img {
        height: 160px;
    }
    
    main {
        padding: 3em 2em;
    }
}

/* Large desktop screens */
@media (min-width: 1200px) {
    .section {
        width: calc(25% - 1em);
    }
}

/* Mobile optimization */
@media (max-width: 480px) {
    header h1 {
        font-size: 1.5em;
    }
    
    main {
        padding: 1em 0.5em;
    }
    
    .section {
        margin: 0.5em 0;
    }
    
    .section a {
        padding: 1em;
    }
    
    .responsive-img {
        height: 150px;
    }
}

/* ==========================================================================
   Accessibility and Performance
   ========================================================================== */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .section,
    .section::before,
    .section a,
    .responsive-img {
        transition: none;
    }
    
    .section:hover {
        transform: none;
    }
    
    .section:hover .responsive-img {
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .section {
        border: 2px solid #333;
    }
    
    .section:hover {
        border-color: #4CAF50;
    }
}

/* Focus styles for keyboard navigation */
.section a:focus {
    outline: 3px solid #4CAF50;
    outline-offset: 2px;
}
