/*
Theme Name: Altamira Child
Description: Child theme of Altamira with accessibility enhancements
Template: altamira
Version: 1.0.0
*/

/* Import parent theme styles */
@import url("../altamira/style.css");

/* =============================================================================
   ACCESSIBILITY ENHANCEMENTS
   ============================================================================= */

/* Skip Navigation Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 9999;
    font-weight: bold;
    font-size: 14px;
}

.skip-link:focus {
    top: 6px;
}

/* Enhanced Focus Indicators */
*:focus {
    outline: 3px solid #ff6b35 !important;
    outline-offset: 2px !important;
}

button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 3px solid #ff6b35 !important;
    outline-offset: 2px !important;
}

/* Remove default focus styles that might conflict */
*:focus {
    box-shadow: none;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .btn,
    button,
    .button {
        border: 2px solid #000 !important;
    }
    
    *:focus {
        outline-width: 4px !important;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto !important;
    }
}

/* Improved Color Contrast */
body {
    color: #333 !important;
    background-color: #fff !important;
}

/* Navigation Accessibility */
.main-navigation {
    position: relative;
}

.main-navigation ul {
    list-style: none;
}

.main-navigation a {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.main-navigation a:hover,
.main-navigation a:focus {
    background-color: rgba(255, 107, 53, 0.1);
    text-decoration: underline;
}

/* Form Accessibility Improvements */
label {
    font-weight: bold;
    margin-bottom: 4px;
    display: block;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
    border: 2px solid #ccc;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
    border-color: #ff6b35;
}

/* Error States */
.error,
[aria-invalid="true"] {
    border-color: #d32f2f !important;
    background-color: #ffebee !important;
}

.error-message {
    color: #d32f2f;
    font-size: 14px;
    margin-top: 4px;
    display: block;
}

/* Button Accessibility */
button,
.button,
.btn,
input[type="submit"] {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    min-height: 44px;
    min-width: 44px;
}

button:hover,
.button:hover,
.btn:hover,
input[type="submit"]:hover {
    background: #e55a2b;
    transform: translateY(-2px);
}

button:disabled,
.button:disabled,
.btn:disabled,
input[type="submit"]:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Image Accessibility */
img {
    max-width: 100%;
    height: auto;
}

/* Ensure decorative images are properly marked */
img[alt=""],
img[role="presentation"] {
    /* These should be ignored by screen readers */
}

/* Table Accessibility */
table {
    border-collapse: collapse;
    width: 100%;
}

th,
td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

th {
    background-color: #f5f5f5;
    font-weight: bold;
}

/* Mobile Touch Targets */
@media (max-width: 768px) {
    button,
    .button,
    .btn,
    a,
    input[type="submit"] {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 16px;
    }
    
    .main-navigation a {
        padding: 16px;
        border-bottom: 1px solid #eee;
    }
}

/* Screen Reader Only Content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Cookie Banner Accessibility */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 16px;
    z-index: 9998;
    border-top: 3px solid #ff6b35;
}

.cookie-banner button {
    margin-left: 16px;
}

/* Print Styles */
@media print {
    .skip-link,
    .cookie-banner,
    .main-navigation {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    a {
        text-decoration: underline;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
    }
}

/* Language Selector Accessibility */
.language-selector {
    position: relative;
}

.language-selector button {
    display: flex;
    align-items: center;
    gap: 8px;
}

.language-selector img {
    width: 20px;
    height: 15px;
}

/* Carousel/Slider Accessibility */
.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.carousel-btn {
    width: 44px;
    height: 44px;
    border: 2px solid #ff6b35;
    background: transparent;
    color: #ff6b35;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.carousel-btn:hover,
.carousel-btn.active,
.carousel-btn[aria-pressed="true"] {
    background: #ff6b35;
    color: white;
}

/* Opening Hours Accessibility */
.opening-hours dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 16px;
}

.opening-hours dt {
    font-weight: bold;
}

.opening-hours dd {
    margin: 0;
}

/* Address Accessibility */
address {
    font-style: normal;
    line-height: 1.6;
}

/* Responsive Design Improvements */
@media (max-width: 480px) {
    .skip-link {
        font-size: 16px;
        padding: 12px 16px;
    }
    
    button,
    .button,
    .btn,
    input[type="submit"] {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
}

