/**
 * Device-Specific Styles for Reciclaje Huella Verde
 * Styles applied based on detected device type
 */

/* Base styles - apply to all devices */
.content {
    transition: all 0.3s ease;
}

/* Smartphone specific styles */
.device-smartphone {
    font-size: 14px;
}

.device-smartphone .content {
    padding: 10px;
}

.device-smartphone .hero-section h1 {
    font-size: 1.8rem;
}

.device-smartphone .hero-section p {
    font-size: 0.9rem;
}

.device-smartphone .btn {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.device-smartphone .navbar-brand img {
    max-height: 40px;
}

.device-smartphone .card {
    margin-bottom: 15px;
}

.device-smartphone .footer {
    padding: 20px 0;
}

/* Tablet specific styles */
.device-tablet {
    font-size: 16px;
}

.device-tablet .content {
    padding: 15px;
}

.device-tablet .hero-section h1 {
    font-size: 2.2rem;
}

.device-tablet .hero-section p {
    font-size: 1rem;
}

.device-tablet .btn {
    padding: 10px 20px;
    font-size: 1rem;
}

.device-tablet .navbar-brand img {
    max-height: 50px;
}

.device-tablet .card {
    margin-bottom: 20px;
}

/* TV/Large Screen specific styles */
.device-tv {
    font-size: 24px;
}

.device-tv .content {
    padding: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.device-tv .hero-section h1 {
    font-size: 3.5rem;
    line-height: 1.2;
}

.device-tv .hero-section p {
    font-size: 1.4rem;
    line-height: 1.6;
}

.device-tv .btn {
    padding: 15px 30px;
    font-size: 1.2rem;
    border-radius: 8px;
}

.device-tv .navbar-brand img {
    max-height: 80px;
}

.device-tv .card {
    margin-bottom: 30px;
    padding: 25px;
}

.device-tv .footer {
    padding: 40px 0;
}

.device-tv .social-links a {
    font-size: 2rem;
    margin: 0 15px;
}

/* Computer/Desktop specific styles */
.device-computer {
    font-size: 18px;
}

.device-computer .content {
    padding: 20px;
}

.device-computer .hero-section h1 {
    font-size: 2.5rem;
}

.device-computer .hero-section p {
    font-size: 1.1rem;
}

.device-computer .btn {
    padding: 12px 24px;
    font-size: 1rem;
}

.device-computer .navbar-brand img {
    max-height: 60px;
}

/* Operating System specific adjustments */
.os-ios .btn,
.os-macos .btn {
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.os-android .btn {
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 500;
}

.os-windows .btn {
    border-radius: 2px;
}

/* Browser specific adjustments */
.browser-safari .content {
    -webkit-font-smoothing: antialiased;
}

.browser-firefox .content {
    -moz-osx-font-smoothing: grayscale;
}

/* Touch device optimizations */
.device-smartphone .btn,
.device-tablet .btn {
    min-height: 44px; /* Apple's recommended touch target size */
    min-width: 44px;
}

.device-smartphone a,
.device-tablet a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

/* High DPI display adjustments */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .device-smartphone .navbar-brand img,
    .device-tablet .navbar-brand img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Landscape orientation adjustments for mobile devices */
@media screen and (orientation: landscape) {
    .device-smartphone .hero-section {
        padding: 20px 0;
    }
    
    .device-smartphone .hero-section h1 {
        font-size: 1.6rem;
    }
    
    .device-tablet .hero-section {
        padding: 30px 0;
    }
}

/* Print styles for all devices */
@media print {
    .device-smartphone,
    .device-tablet,
    .device-computer,
    .device-tv {
        font-size: 12pt;
        color: black;
        background: white;
    }
    
    .btn,
    .social-links,
    .navbar {
        display: none;
    }
}

/* Accessibility improvements for all devices */
.device-smartphone .btn:focus,
.device-tablet .btn:focus,
.device-computer .btn:focus,
.device-tv .btn:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .content {
        transition: none;
    }
}

/* Dark mode support (if user prefers dark color scheme) */
@media (prefers-color-scheme: dark) {
    .device-smartphone,
    .device-tablet,
    .device-computer,
    .device-tv {
        background-color: #1a1a1a;
        color: #ffffff;
    }
    
    .card {
        background-color: #2d2d2d;
        border-color: #404040;
    }
}

/* Device-specific animations */
.device-smartphone .fade-in {
    animation: fadeInMobile 0.5s ease-in;
}

.device-tablet .fade-in {
    animation: fadeInTablet 0.6s ease-in;
}

.device-computer .fade-in {
    animation: fadeInDesktop 0.7s ease-in;
}

.device-tv .fade-in {
    animation: fadeInTV 0.8s ease-in;
}

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

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

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

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